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