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