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