@Test public void lookup() throws Exception { LookupRequest.Builder request = LookupRequest.newBuilder(); LookupResponse.Builder response = LookupResponse.newBuilder(); expectRpc("lookup", request.build(), response.build()); }
public LookupResponse lookup(LookupRequest request) throws DatastoreException { try (InputStream is = remoteRpc.call("lookup", request)) { return LookupResponse.parseFrom(is); } catch (IOException exception) { throw invalidResponseException("lookup", exception); } }
Datastore { public LookupResponse lookup(LookupRequest request) throws DatastoreException { try (InputStream is = remoteRpc.call("lookup", request)) { return LookupResponse.parseFrom(is); } catch (IOException exception) { throw invalidResponseException("lookup", exception); } } }
Datastore { public LookupResponse lookup(LookupRequest request) throws DatastoreException { try (InputStream is = remoteRpc.call("lookup", request)) { return LookupResponse.parseFrom(is); } catch (IOException exception) { throw invalidResponseException("lookup", exception); } } Datastore(RemoteRpc remoteRpc); }
Datastore { public LookupResponse lookup(LookupRequest request) throws DatastoreException { try (InputStream is = remoteRpc.call("lookup", request)) { return LookupResponse.parseFrom(is); } catch (IOException exception) { throw invalidResponseException("lookup", exception); } } Datastore(RemoteRpc remoteRpc); void resetRpcCount(); int getRpcCount(); AllocateIdsResponse allocateIds(AllocateIdsRequest request); BeginTransactionResponse beginTransaction(BeginTransactionRequest request); CommitResponse commit(CommitRequest request); LookupResponse lookup(LookupRequest request); ReserveIdsResponse reserveIds(ReserveIdsRequest request); RollbackResponse rollback(RollbackRequest request); RunQueryResponse runQuery(RunQueryRequest request); }
Datastore { public LookupResponse lookup(LookupRequest request) throws DatastoreException { try (InputStream is = remoteRpc.call("lookup", request)) { return LookupResponse.parseFrom(is); } catch (IOException exception) { throw invalidResponseException("lookup", exception); } } Datastore(RemoteRpc remoteRpc); void resetRpcCount(); int getRpcCount(); AllocateIdsResponse allocateIds(AllocateIdsRequest request); BeginTransactionResponse beginTransaction(BeginTransactionRequest request); CommitResponse commit(CommitRequest request); LookupResponse lookup(LookupRequest request); ReserveIdsResponse reserveIds(ReserveIdsRequest request); RollbackResponse rollback(RollbackRequest request); RunQueryResponse runQuery(RunQueryRequest request);  }