### Question:
SOSCapabilitiesMapper_200 { public ServiceDescriptor mapCapabilities(final CapabilitiesDocument capabilitiesDoc) throws OXFException { final String version = mapVersion(capabilitiesDoc); final CapabilitiesType capabilities = capabilitiesDoc.getCapabilities(); final ServiceProvider serviceProvider = mapServiceProvider(capabilities); final OperationsMetadata operationsMetadata = mapOperationsMetadata(capabilities); final ServiceIdentification serviceIdentification = mapServiceIdentification(capabilities); final SOSContents contents = mapContents(capabilitiesDoc); final ServiceDescriptor serviceDesc = new ServiceDescriptor(version, serviceIdentification, serviceProvider, operationsMetadata, contents); return serviceDesc; }  ServiceDescriptor mapCapabilities(final CapabilitiesDocument capabilitiesDoc); static void main(final String[] args);  }### Answer:
@Test public void shouldMapServiceVersion() throws OXFException { ServiceDescriptor serviceDescriptor = mapper.mapCapabilities(capabilitiesDocument); Assert.assertThat(serviceDescriptor.getVersion(), Is.is("2.0.0")); }
@Test public void shouldIgnoreMissingContentsSection() throws OXFException { ServiceDescriptor serviceDescriptor = mapper.mapCapabilities(capabilitiesDocWithoutContentsSection); Assert.assertThat(serviceDescriptor.getContents(), IsInstanceOf.instanceOf(SOSContents.class)); Assert.assertThat(serviceDescriptor.getContents().getDataIdentificationCount(), Is.is(0)); Assert.assertThat(serviceDescriptor.getOperationsMetadata(), IsNull.nullValue()); }