@Test
void testDetectWithCompatibleSchemaVersions() {

    DeploymentDescriptor deploymentDescriptor = buildDeploymentDescriptor(SCHEMA_VERSION_2_0, FOO_ID);
    ExtensionDescriptor extensionDescriptor1 = buildExtensionDescriptor(SCHEMA_VERSION_2_1, BAR_ID);
    ExtensionDescriptor extensionDescriptor2 = buildExtensionDescriptor(SCHEMA_VERSION_2_0, BAZ_ID);
    List<ExtensionDescriptor> extensionDescriptorChain = Arrays.asList(extensionDescriptor1, extensionDescriptor2);
    Version schemaVersion = schemaVersionDetector.detect(deploymentDescriptor, extensionDescriptorChain);
    assertEquals(SCHEMA_VERSION_2_1, schemaVersion.toString());
}