@Test(expected = ClientHandlerException.class) public void testPut_ClientHandlerException_caused() { ClientHandlerException ex = new ClientHandlerException(); ex.initCause(new java.net.ConnectException()); when(client.put(any(String.class), any(String.class))).thenThrow(ex); connection.put(PATH, JSON_STRING); }
@Nullable public JsonRestClientResponse put(String path, String someJson) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } return putWithoutInitCheck(path, someJson); }
SFlowRTConnection { @Nullable public JsonRestClientResponse put(String path, String someJson) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } return putWithoutInitCheck(path, someJson); } }
SFlowRTConnection { @Nullable public JsonRestClientResponse put(String path, String someJson) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } return putWithoutInitCheck(path, someJson); } SFlowRTConnection(ScheduledExecutorService executor, String collectorUri, FlowCache flowCache, JsonRestClient client); }
SFlowRTConnection { @Nullable public JsonRestClientResponse put(String path, String someJson) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } return putWithoutInitCheck(path, someJson); } 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 { @Nullable public JsonRestClientResponse put(String path, String someJson) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } return putWithoutInitCheck(path, someJson); } 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();  }