void verifyCalledWithJobAndResult(JobParameters job, int result) throws Exception {
      Pair<Bundle, Integer> jobFinishedResult =
          getJobFinishedFuture().get(TIMEOUT_MS, TimeUnit.MILLISECONDS);
      assertNotNull(jobFinishedResult);

      JobCoder jc = getJobCoder();
      assertEquals(
          // re-encode so they're the same class
          jc.decode(jc.encode(job, new Bundle())).build(),
          jc.decode(jobFinishedResult.first).build());
      assertEquals(result, (int) jobFinishedResult.second);
    }
Tests for the {@link JobService} class.
jobdispatcher/src/test/java/com/firebase/jobdispatcher/JobServiceTest.java