@Test(expected = ClientHandlerException.class) public void testDelete_ClientHandlerException_noCause() { ClientHandlerException ex = new ClientHandlerException(); when(client.delete(any(String.class))).thenThrow(ex); connection.delete(PATH); }
public JsonRestClientResponse delete(String path) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } try { JsonRestClientResponse responce = client.delete(path); Preconditions.checkNotNull(responce); logStatusCode(DELETE, responce.getStatusCode(), path, null); return responce; } catch (ClientHandlerException e) { processClientHandlerException(e); } return null; }
SFlowRTConnection { public JsonRestClientResponse delete(String path) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } try { JsonRestClientResponse responce = client.delete(path); Preconditions.checkNotNull(responce); logStatusCode(DELETE, responce.getStatusCode(), path, null); return responce; } catch (ClientHandlerException e) { processClientHandlerException(e); } return null; } }
SFlowRTConnection { public JsonRestClientResponse delete(String path) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } try { JsonRestClientResponse responce = client.delete(path); Preconditions.checkNotNull(responce); logStatusCode(DELETE, responce.getStatusCode(), path, null); return responce; } catch (ClientHandlerException e) { processClientHandlerException(e); } return null; } SFlowRTConnection(ScheduledExecutorService executor, String collectorUri, FlowCache flowCache, JsonRestClient client); }
SFlowRTConnection { public JsonRestClientResponse delete(String path) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } try { JsonRestClientResponse responce = client.delete(path); Preconditions.checkNotNull(responce); logStatusCode(DELETE, responce.getStatusCode(), path, null); return responce; } catch (ClientHandlerException e) { processClientHandlerException(e); } return null; } SFlowRTConnection(ScheduledExecutorService executor, String collectorUri, FlowCache flowCache, JsonRestClient client); @Nullable String getJsonResponse(String path, MultivaluedMap<String, String> params); @Nullable JsonRestClientResponse get(String path,
            MultivaluedMap<String, String> params); @Nullable JsonRestClientResponse put(String path, String someJson); JsonRestClientResponse delete(String path); boolean isInitialized(); FlowCache getFlowCache(); ScheduledExecutorService getExecutor(); String getCollectorUri(); void initialize(); }
SFlowRTConnection { public JsonRestClientResponse delete(String path) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } try { JsonRestClientResponse responce = client.delete(path); Preconditions.checkNotNull(responce); logStatusCode(DELETE, responce.getStatusCode(), path, null); return responce; } catch (ClientHandlerException e) { processClientHandlerException(e); } return null; } SFlowRTConnection(ScheduledExecutorService executor, String collectorUri, FlowCache flowCache, JsonRestClient client); @Nullable String getJsonResponse(String path, MultivaluedMap<String, String> params); @Nullable JsonRestClientResponse get(String path,
            MultivaluedMap<String, String> params); @Nullable JsonRestClientResponse put(String path, String someJson); JsonRestClientResponse delete(String path); boolean isInitialized(); FlowCache getFlowCache(); ScheduledExecutorService getExecutor(); String getCollectorUri(); void initialize();  }