@Test
public void addProjectionInterfaceThrowsExceptionWhenMultipleSimilarlyNamedPresent() {

    // given
    var projectionName = "projection-name";
    var projectionTarget = (Class) Integer.class;
    projectionService.projectionClassMap.put(Pair.of(projectionName, projectionTarget), annotatedClass);
    given(namedProjectionAnnotationMock.name()).willReturn(projectionName);
    given(namedProjectionAnnotationMock.target()).willReturn(projectionTarget);
    given(namedProjectionAnnotationMock.defaultProjection()).willReturn(false);
    // when / then
    assertThatThrownBy(() -> projectionService.addProjectionInterface(namedProjectionAnnotationMock, annotatedClass))
            .isInstanceOf(MultipleSimilarlyNamedProjectionsException.class)
            .hasMessage(String.format("Multiple interfaces annotated with @NamedInterface " +
                    "have the same name ('%s') for the target class '%s'!", projectionName, projectionTarget.getName()));
}