### Question:
Datastore { public CommitResponse commit(CommitRequest request) throws DatastoreException { try (InputStream is = remoteRpc.call("commit", request)) { return CommitResponse.parseFrom(is); } catch (IOException exception) { throw invalidResponseException("commit", 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);  }### Answer:
@Test public void commit() throws Exception { CommitRequest.Builder request = CommitRequest.newBuilder(); request.setTransaction(ByteString.copyFromUtf8("project-id")); CommitResponse.Builder response = CommitResponse.newBuilder(); expectRpc("commit", request.build(), response.build()); }