@Test
  public void testWriteToBundle_persisted() {
    Bundle b =
        writer.writeToBundle(
            initializeDefaultBuilder().setLifetime(Lifetime.FOREVER).build(), new Bundle());

    assertTrue("persisted", b.getBoolean("persisted"));

    for (int lifetime : new int[] {Lifetime.UNTIL_NEXT_BOOT}) {
      b =
          writer.writeToBundle(
              initializeDefaultBuilder().setLifetime(lifetime).build(), new Bundle());

      assertFalse("persisted", b.getBoolean("persisted"));
    }
  }
Tests for the {@link GooglePlayJobWriter} class.
jobdispatcher/src/test/java/com/firebase/jobdispatcher/GooglePlayJobWriterTest.java