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