@Test void testDetectWithSameSchemaVersions() { DeploymentDescriptor deploymentDescriptor = buildDeploymentDescriptor(SCHEMA_VERSION_2_0, FOO_ID); ExtensionDescriptor extensionDescriptor1 = buildExtensionDescriptor(SCHEMA_VERSION_2_0, 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_0, schemaVersion.toString()); }
public Version detect(DeploymentDescriptor deploymentDescriptor, List<ExtensionDescriptor> extensionDescriptorChain) throws ContentException { validateSchemaVersionCompatibility(deploymentDescriptor, extensionDescriptorChain); return getMax(deploymentDescriptor, extensionDescriptorChain); }
SchemaVersionDetector { public Version detect(DeploymentDescriptor deploymentDescriptor, List<ExtensionDescriptor> extensionDescriptorChain) throws ContentException { validateSchemaVersionCompatibility(deploymentDescriptor, extensionDescriptorChain); return getMax(deploymentDescriptor, extensionDescriptorChain); } }
SchemaVersionDetector { public Version detect(DeploymentDescriptor deploymentDescriptor, List<ExtensionDescriptor> extensionDescriptorChain) throws ContentException { validateSchemaVersionCompatibility(deploymentDescriptor, extensionDescriptorChain); return getMax(deploymentDescriptor, extensionDescriptorChain); }  }
SchemaVersionDetector { public Version detect(DeploymentDescriptor deploymentDescriptor, List<ExtensionDescriptor> extensionDescriptorChain) throws ContentException { validateSchemaVersionCompatibility(deploymentDescriptor, extensionDescriptorChain); return getMax(deploymentDescriptor, extensionDescriptorChain); }  Version detect(DeploymentDescriptor deploymentDescriptor, List<ExtensionDescriptor> extensionDescriptorChain); }
SchemaVersionDetector { public Version detect(DeploymentDescriptor deploymentDescriptor, List<ExtensionDescriptor> extensionDescriptorChain) throws ContentException { validateSchemaVersionCompatibility(deploymentDescriptor, extensionDescriptorChain); return getMax(deploymentDescriptor, extensionDescriptorChain); }  Version detect(DeploymentDescriptor deploymentDescriptor, List<ExtensionDescriptor> extensionDescriptorChain);  }