@VisibleForTesting
 static IJobUpdateQuery queryActiveByJob(IJobKey job) {
   return IJobUpdateQuery.build(
       new JobUpdateQuery()
           .setJobKey(job.newBuilder())
           .setUpdateStatuses(Updates.ACTIVE_JOB_UPDATE_STATES));
 }
  @Test
  public void testGetJobUpdateSummaries() throws Exception {
    JobUpdateQuery query = new JobUpdateQuery().setRole(ROLE);
    List<JobUpdateSummary> summaries = createJobUpdateSummaries(5);
    expect(storageUtil.jobUpdateStore.fetchJobUpdateSummaries(IJobUpdateQuery.build(query)))
        .andReturn(IJobUpdateSummary.listFromBuilders(summaries));

    control.replay();

    Response response = assertOkResponse(thrift.getJobUpdateSummaries(query));
    assertEquals(
        summaries, response.getResult().getGetJobUpdateSummariesResult().getUpdateSummaries());
  }
 @VisibleForTesting
 static IJobUpdateQuery queryByUpdate(IJobUpdateKey key) {
   return IJobUpdateQuery.build(new JobUpdateQuery().setKey(key.newBuilder()));
 }