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