use of de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByDataSpecificationReferenceRequest in project FAAAST-Service by FraunhoferIOSB.
the class RequestHandlerManagerTest method testGetAllConceptDescriptionsByDataSpecificationReferenceRequest.
@Test
public void testGetAllConceptDescriptionsByDataSpecificationReferenceRequest() throws ResourceNotFoundException {
Reference reference = ReferenceHelper.toReference(environment.getConceptDescriptions().get(0).getIdentification(), ConceptDescription.class);
when(persistence.get(null, null, reference, new OutputModifier())).thenReturn(environment.getConceptDescriptions());
GetAllConceptDescriptionsByDataSpecificationReferenceRequest request = new GetAllConceptDescriptionsByDataSpecificationReferenceRequest.Builder().outputModifier(new OutputModifier()).dataSpecification(reference).build();
GetAllConceptDescriptionsByDataSpecificationReferenceResponse response = manager.execute(request);
GetAllConceptDescriptionsByDataSpecificationReferenceResponse expected = new GetAllConceptDescriptionsByDataSpecificationReferenceResponse.Builder().payload(environment.getConceptDescriptions()).statusCode(StatusCode.Success).build();
Assert.assertEquals(expected, response);
}
Aggregations