diff --git a/vorgang-manager-server/src/test/java/de/ozgcloud/vorgang/common/migration/M014_AddItemNameBescheidToPatchAttachedItemCommandITCase.java b/vorgang-manager-server/src/test/java/de/ozgcloud/vorgang/common/migration/M014_AddItemNameBescheidToPatchAttachedItemCommandITCase.java index a557969ce56370bb7f02c85711f114a87a3eaa9c..aceb14ff1cc2afcf8c8f67fdbc722a10b8716645 100644 --- a/vorgang-manager-server/src/test/java/de/ozgcloud/vorgang/common/migration/M014_AddItemNameBescheidToPatchAttachedItemCommandITCase.java +++ b/vorgang-manager-server/src/test/java/de/ozgcloud/vorgang/common/migration/M014_AddItemNameBescheidToPatchAttachedItemCommandITCase.java @@ -105,7 +105,8 @@ class M014_AddItemNameBescheidToPatchAttachedItemCommandITCase { @SuppressWarnings("unchecked") private Document buildExpectedPatchAttachedItemCommand(Document patchAttachedItemCommand) { - var body = new HashMap<>((Map<String, Object>) patchAttachedItemCommand.get(CommandDocumentTestFactory.BODY_OBJECT_FIELD)); + var body = new HashMap<>( + (Map<String, Object>) patchAttachedItemCommand.get(CommandDocumentTestFactory.BODY_OBJECT_FIELD)); body.put(ITEM_NAME_FIELD, BESCHEID_ITEM_NAME); var command = CommandDocumentTestFactory.createWithOrderAndBody(PATCH_ATTACHED_ITEM_ORDER, body); command.put(ID_FIELD, patchAttachedItemCommand.getObjectId(ID_FIELD)); @@ -129,9 +130,10 @@ class M014_AddItemNameBescheidToPatchAttachedItemCommandITCase { void shouldQueryPatchAttachedItemCommandsWithParentId() { var query = migration.createQuery(List.of(sendBescheidCommand.getObjectId(ID_FIELD).toString())); - var comands = mongoOperations.find(query, Document.class, MigrationDbTestUtils.COMMAND_COLLECTION); + var commands = mongoOperations.find(query, Document.class, MigrationDbTestUtils.COMMAND_COLLECTION); - assertThat(comands).usingRecursiveFieldByFieldElementComparator().containsExactly(patchAttachedItemCommand); + assertThat(commands).usingRecursiveFieldByFieldElementComparator() + .containsExactly(patchAttachedItemCommand); } } @@ -143,7 +145,8 @@ class M014_AddItemNameBescheidToPatchAttachedItemCommandITCase { var command = migrationDbTestUtils.getCommand(patchAttachedItemCommand.getObjectId(ID_FIELD)); - assertThat(command).usingRecursiveComparison().isEqualTo(buildExpectedPatchAttachedItemCommand(patchAttachedItemCommand)); + assertThat(command).usingRecursiveComparison() + .isEqualTo(buildExpectedPatchAttachedItemCommand(patchAttachedItemCommand)); } } @@ -151,7 +154,7 @@ class M014_AddItemNameBescheidToPatchAttachedItemCommandITCase { @Nested class TestFullMigration { @Test - void shouldContainSendBescheidCommand() { + void shouldKeepSendBescheidCommand() { migration.doMigration(mongoOperations); var command = migrationDbTestUtils.getCommand(sendBescheidCommand.getObjectId(ID_FIELD)); @@ -165,7 +168,8 @@ class M014_AddItemNameBescheidToPatchAttachedItemCommandITCase { var command = migrationDbTestUtils.getCommand(patchAttachedItemCommand.getObjectId(ID_FIELD)); - assertThat(command).usingRecursiveComparison().isEqualTo(buildExpectedPatchAttachedItemCommand(patchAttachedItemCommand)); + assertThat(command).usingRecursiveComparison() + .isEqualTo(buildExpectedPatchAttachedItemCommand(patchAttachedItemCommand)); } @Test @@ -192,7 +196,8 @@ class M014_AddItemNameBescheidToPatchAttachedItemCommandITCase { var commands = mongoOperations.findAll(Document.class, MigrationDbTestUtils.COMMAND_COLLECTION); - assertThat(commands).usingRecursiveFieldByFieldElementComparator().containsExactlyInAnyOrderElementsOf(expectedCommands); + assertThat(commands).usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrderElementsOf(expectedCommands); } }