@Test
  public void testAddConstraints() {
    builder
        .setConstraints()
        .addConstraint(Constraint.DEVICE_CHARGING)
        .addConstraint(Constraint.ON_UNMETERED_NETWORK);

    int[] expected = {Constraint.DEVICE_CHARGING, Constraint.ON_UNMETERED_NETWORK};

    assertEquals(Constraint.compact(expected), Constraint.compact(builder.getConstraints()));
  }
Tests for the {@link Job.Builder} class.
jobdispatcher/src/test/java/com/firebase/jobdispatcher/JobBuilderTest.java