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