use of de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsBySemanticIdRequest in project FAAAST-Service by FraunhoferIOSB.
the class RequestHandlerManagerTest method testGetAllSubmodelsBySemanticIdRequest.
@Test
public void testGetAllSubmodelsBySemanticIdRequest() throws ResourceNotFoundException {
when(persistence.get(null, SUBMODEL_ELEMENT_REF, new OutputModifier())).thenReturn(environment.getSubmodels());
GetAllSubmodelsBySemanticIdRequest request = new GetAllSubmodelsBySemanticIdRequest.Builder().semanticId(SUBMODEL_ELEMENT_REF).outputModifier(new OutputModifier()).build();
GetAllSubmodelsBySemanticIdResponse response = manager.execute(request);
GetAllSubmodelsBySemanticIdResponse expected = new GetAllSubmodelsBySemanticIdResponse.Builder().payload(environment.getSubmodels()).statusCode(StatusCode.Success).build();
Assert.assertEquals(expected, response);
}
Aggregations