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