@Test
public void testConfiguredExpiryMillis() {

    assertEquals(zms.configuredDueDateMillis(null, null), 0);
    assertEquals(zms.configuredDueDateMillis(null, -3), 0);
    assertEquals(zms.configuredDueDateMillis(null, 0), 0);
    assertEquals(zms.configuredDueDateMillis(-3, null), 0);
    assertEquals(zms.configuredDueDateMillis(0, null), 0);
    assertEquals(zms.configuredDueDateMillis(-3, -3), 0);
    assertEquals(zms.configuredDueDateMillis(0, 0), 0);
    long extMillis = TimeUnit.MILLISECONDS.convert(10, TimeUnit.DAYS);
    long millis = zms.configuredDueDateMillis(null, 10);
    assertTrue(validateDueDate(millis, extMillis));
    millis = zms.configuredDueDateMillis(null, 10);
    assertTrue(validateDueDate(millis, extMillis));
    millis = zms.configuredDueDateMillis(-1, 10);
    assertTrue(validateDueDate(millis, extMillis));
    millis = zms.configuredDueDateMillis(0, 10);
    assertTrue(validateDueDate(millis, extMillis));
    millis = zms.configuredDueDateMillis(5, 10);
    assertTrue(validateDueDate(millis, extMillis));
    millis = zms.configuredDueDateMillis(20, 10);
    assertTrue(validateDueDate(millis, extMillis));
    millis = zms.configuredDueDateMillis(10, null);
    assertTrue(validateDueDate(millis, extMillis));
    millis = zms.configuredDueDateMillis(10, -1);
    assertTrue(validateDueDate(millis, extMillis));
    millis = zms.configuredDueDateMillis(10, 0);
    assertTrue(validateDueDate(millis, extMillis));
}