@Test
public void deleteModule() throws AuthenticationException, UnknownHostException {

    final DbModule dbModule = new DbModule();
    dbModule.setName("moduleTest");
    dbModule.setVersion("1.0.0");
    when(repositoryHandler.getModule(dbModule.getId())).thenReturn(dbModule);
    client().addFilter(new HTTPBasicAuthFilter(GrapesTestUtils.USER_4TEST, GrapesTestUtils.PASSWORD_4TEST));
    final WebResource resource = client().resource("/" + ServerAPI.MODULE_RESOURCE + "/" + dbModule.getName() + "/" + dbModule.getVersion());
    final ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).delete(ClientResponse.class);
    assertNotNull(response);
    assertEquals(HttpStatus.OK_200, response.getStatus());
    verify(repositoryHandler, times(1)).deleteModule(dbModule.getId());
}