ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer { Spec getSpec() { return spec; } ConfigProxyRpcServer(ProxyServer proxyServer, Supervisor supervisor, Spec spec); void run(); @Override void notifyTargetInvalid(Target target); void returnOkResponse(JRTServerConfigRequest request, RawConfig config); void returnErrorResponse(JRTServerConfigRequest request, int errorCode, String message);  }
@Test public void basic() { ProxyServer proxy = createTestServer(new MockConfigSource()); Spec spec = new Spec("localhost", 12345); ConfigProxyRpcServer server = new ConfigProxyRpcServer(proxy, new Supervisor(new Transport()), spec); assertThat(server.getSpec(), is(spec)); }