### Question:
SFlowRTConnection { @Nullable public JsonRestClientResponse get(String path, MultivaluedMap<String, String> params) { if (!isInitialized()) { throw new IllegalStateException(EX_MSG_NOT_INITIALIZED); } try { JsonRestClientResponse responce = client.get(path, params); Preconditions.checkNotNull(responce); 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();  }### Answer:
@Test public void testGet() { JsonRestClientResponse res = connection.get(PATH, params); assertEquals(response, res); }
@Test(expected = ClientHandlerException.class) public void testGet_ClientHandlerException_noCause() { ClientHandlerException ex = new ClientHandlerException(); when(client.get(any(String.class), Mockito.<MultivaluedMap<String, String>>any())).thenThrow(ex); connection.get(PATH, params); }
@Test(expected = ClientHandlerException.class) public void testGet_ClientHandlerException_caused() { ClientHandlerException ex = new ClientHandlerException(); ex.initCause(new java.net.ConnectException()); when(client.get(any(String.class), Mockito.<MultivaluedMap<String, String>>any())).thenThrow(ex); connection.get(PATH, params); }