@Test public void loadAll(@Injectable HttpTransport httpTransport) throws RemoteServerUnavailableException, RemoteOperationException { final int expectedCode = 200; Response response = new Response(); response.setStatusCode(expectedCode); String url = "http: String responseString = "{\n" + " \"application\": {\n" + " \"ffd\": \"dd\"\n" + " },\n" + " \"price@default\": {\n" + " \"dd\": \"ss\"\n" + " }\n" + "}"; response.setContent(responseString); new Expectations() { { Deencapsulation.newUninitializedInstance(DefaultHttpTransport.class); result = httpTransport; httpTransport.sendGetRequest(anyString, (Map<String, String>) any); result = response; } }; ServiceCombConfigClient serviceCombClient = new ConfigCenterClient(url, httpTransport); ServiceCombConfigProperties serviceCombConfigProperties = new ServiceCombConfigProperties(); serviceCombConfigProperties.setServiceName("price"); serviceCombConfigProperties.setAppName("default"); serviceCombConfigProperties.setVersion("0.0.1"); Map<String, Object> actual = serviceCombClient .loadAll(serviceCombConfigProperties, "default"); Assert.assertEquals(2, actual.size()); Assert.assertEquals("dd", actual.get("ffd")); Assert.assertEquals("ss", actual.get("dd")); }
public abstract Map<String, Object> loadAll( ServiceCombConfigProperties serviceCombConfigProperties, String project) throws RemoteOperationException;
ServiceCombConfigClient { public abstract Map<String, Object> loadAll( ServiceCombConfigProperties serviceCombConfigProperties, String project) throws RemoteOperationException; }
ServiceCombConfigClient { public abstract Map<String, Object> loadAll( ServiceCombConfigProperties serviceCombConfigProperties, String project) throws RemoteOperationException; ServiceCombConfigClient(String urls, HttpTransport httpTransport); }
ServiceCombConfigClient { public abstract Map<String, Object> loadAll( ServiceCombConfigProperties serviceCombConfigProperties, String project) throws RemoteOperationException; ServiceCombConfigClient(String urls, HttpTransport httpTransport); abstract Map<String, Object> loadAll(
      ServiceCombConfigProperties serviceCombConfigProperties, String project); }
ServiceCombConfigClient { public abstract Map<String, Object> loadAll( ServiceCombConfigProperties serviceCombConfigProperties, String project) throws RemoteOperationException; ServiceCombConfigClient(String urls, HttpTransport httpTransport); abstract Map<String, Object> loadAll(
      ServiceCombConfigProperties serviceCombConfigProperties, String project);  }