@Test
void testBuildWithMultipleDescriptorsExtendingTheSameParent() {

    DeploymentDescriptor deploymentDescriptor = buildDeploymentDescriptor(FOO_ID);
    ExtensionDescriptor extensionDescriptor1 = buildExtensionDescriptor(BAR_ID, FOO_ID);
    ExtensionDescriptor extensionDescriptor2 = buildExtensionDescriptor(QUX_ID, FOO_ID);
    List<ExtensionDescriptor> extensionDescriptors = Arrays.asList(extensionDescriptor1, extensionDescriptor2);
    ExtensionDescriptorChainBuilder extensionDescriptorChainBuilder = new ExtensionDescriptorChainBuilder();
    ContentException contentException = assertThrows(ContentException.class,
                                                     () -> extensionDescriptorChainBuilder.build(deploymentDescriptor,
                                                                                                 extensionDescriptors));
    String expectedMessage = MessageFormat.format(Messages.MULTIPLE_EXTENSION_DESCRIPTORS_EXTEND_THE_PARENT_0,
                                                  deploymentDescriptor.getId());
    assertEquals(expectedMessage, contentException.getMessage());
}