@Test public void delegatePrepare() throws Exception { when(server.prepare(prepareMessage)).thenReturn(acceptRejectResponse); NomadEndpoint<String> namedServer = new NomadEndpoint<>(name, server); assertEquals(acceptRejectResponse, namedServer.prepare(prepareMessage)); verify(server).prepare(prepareMessage); }
@Override public AcceptRejectResponse prepare(PrepareMessage message) throws NomadException { return server.prepare(message); }
NomadEndpoint implements NomadServer<T> { @Override public AcceptRejectResponse prepare(PrepareMessage message) throws NomadException { return server.prepare(message); } }
NomadEndpoint implements NomadServer<T> { @Override public AcceptRejectResponse prepare(PrepareMessage message) throws NomadException { return server.prepare(message); } NomadEndpoint(InetSocketAddress address, NomadServer<T> server); }
NomadEndpoint implements NomadServer<T> { @Override public AcceptRejectResponse prepare(PrepareMessage message) throws NomadException { return server.prepare(message); } NomadEndpoint(InetSocketAddress address, NomadServer<T> server); InetSocketAddress getAddress(); @Override DiscoverResponse<T> discover(); @Override AcceptRejectResponse prepare(PrepareMessage message); @Override AcceptRejectResponse commit(CommitMessage message); @Override AcceptRejectResponse rollback(RollbackMessage message); @Override AcceptRejectResponse takeover(TakeoverMessage message); @Override void close(); @Override String toString(); }
NomadEndpoint implements NomadServer<T> { @Override public AcceptRejectResponse prepare(PrepareMessage message) throws NomadException { return server.prepare(message); } NomadEndpoint(InetSocketAddress address, NomadServer<T> server); InetSocketAddress getAddress(); @Override DiscoverResponse<T> discover(); @Override AcceptRejectResponse prepare(PrepareMessage message); @Override AcceptRejectResponse commit(CommitMessage message); @Override AcceptRejectResponse rollback(RollbackMessage message); @Override AcceptRejectResponse takeover(TakeoverMessage message); @Override void close(); @Override String toString();  }