@Test
public void shouldCreateMultipleInstancesOfObjectWhenUsingInstanceDescriptors() {

    // given
    Annotation annotation = annotation().withInstanceDescriptor("TEST_CODE1", new String[]{})
            .withInstanceDescriptor("TEST_CODE2", new String[]{"PROPERTY_VALUE"}).build();
    // when
    Map<RepositoryObjectKey, ClassWithStringConstructor> objects = annotatedObjectFactory.createObjects(ClassWithStringConstructor.class, annotation);
    // then
    assertThatItemMap(objects).containsObjectsThatAreNotSame("TEST_CODE1", "TEST_CODE2").hasSize(2);
    assertThat(objects.get(RepositoryObjectKey.withKey("TEST_CODE2")).property).isSameAs("PROPERTY_VALUE");
}