ClusterRestApi { @GET @Path("/" + RestConstants.ADDRESS) @SubmarineApi public Response getClusterAddress() { SubmarineConfiguration sConf = SubmarineConfiguration.getInstance(); String clusterAddr = sConf.getClusterAddress(); String[] arrAddr = clusterAddr.split(","); List<String> listAddr = Arrays.asList(arrAddr); return new JsonResponse.Builder<List<String>>(Response.Status.OK) .success(true).result(listAddr).build(); }  @VisibleForTesting void setClusterServer(ClusterServer clusterServer); @GET @Path("/" + RestConstants.ADDRESS) @SubmarineApi Response getClusterAddress(); @GET @Path("/" + RestConstants.NODES) @SubmarineApi Response getClusterNodes(); @GET @Path("/" + RestConstants.NODE + "/{nodeName}/{intpName}") @SubmarineApi Response getClusterNode(@PathParam("nodeName") String nodeName,
                                 @PathParam("intpName") String intpName);  }
@Test public void testGetClusterAddress() { SubmarineConfiguration conf = SubmarineConfiguration.getInstance(); String addr1 = "127.0.0.1:4569"; String addr2 = "127.0.0.1:8888"; conf.setClusterAddress(addr1 + "," + addr2); Response response = clusterRestApi.getClusterAddress(); List<String> result = getResultListFromResponse(response, String.class); assertEquals(addr1, result.get(0)); assertEquals(addr2, result.get(1)); }