use of de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelRequest in project FAAAST-Service by FraunhoferIOSB.
the class RequestHandlerManagerTest method testPostSubmodelRequest.
@Test
public void testPostSubmodelRequest() throws ResourceNotFoundException {
when(persistence.put(environment.getSubmodels().get(0))).thenReturn(environment.getSubmodels().get(0));
PostSubmodelRequest request = new PostSubmodelRequest.Builder().submodel(environment.getSubmodels().get(0)).build();
PostSubmodelResponse response = manager.execute(request);
PostSubmodelResponse expected = new PostSubmodelResponse.Builder().payload(environment.getSubmodels().get(0)).statusCode(StatusCode.SuccessCreated).build();
Assert.assertEquals(expected, response);
}
Aggregations