### Question:
SOSCapabilitiesMapper_100 { public ServiceDescriptor mapCapabilities(final CapabilitiesDocument capabilitiesDoc) throws OXFException { final String version = mapVersion(capabilitiesDoc); final ServiceIdentification serviceIdentification = mapServiceIdentification(capabilitiesDoc.getCapabilities().getServiceIdentification()); final ServiceProvider serviceProvider = mapServiceProvider(capabilitiesDoc); final OperationsMetadata operationsMetadata = mapOperationsMetadata(capabilitiesDoc.getCapabilities().getOperationsMetadata()); final SOSContents contents = mapContents(capabilitiesDoc); addDatasetParameterFromContentsSection(operationsMetadata, contents); final ServiceDescriptor serviceDesc = new ServiceDescriptor(version, serviceIdentification, serviceProvider, operationsMetadata, contents); return serviceDesc; }  ServiceDescriptor mapCapabilities(final CapabilitiesDocument capabilitiesDoc);  }### Answer:
@Test public void shouldNotThrowNPEWhileReceivingMissingContentsSection() throws OXFException { CapabilitiesDocument capabilitiesDoc = CapabilitiesDocument.Factory.newInstance(); Capabilities capabilities = capabilitiesDoc.addNewCapabilities(); ServiceIdentification serviceIdentification = capabilities.addNewServiceIdentification(); serviceIdentification.addNewTitle().setStringValue("test-title"); serviceIdentification.addNewServiceType().setStringValue("test-service-type"); serviceIdentification.addNewAbstract(); serviceIdentification.addNewServiceTypeVersion().setStringValue(SOS_VERSION); capabilities.setVersion(SOS_VERSION); capabilities.addNewOperationsMetadata(); new SOSCapabilitiesMapper_100().mapCapabilities(capabilitiesDoc); }