public void testExpired() {
    Date now = new Date();
    Date past = new Date(now.getTime() - 1000L * (MAX_AGE + 1));

    String nonce = _dateFormat.format(past) + "abc";

    assertEquals(NonceVerifier.TOO_OLD, _nonceVerifier.seen("op1", nonce));
  }
  public void testSeen() {
    String nonce = _dateFormat.format(new Date()) + "abc";

    assertEquals(NonceVerifier.OK, _nonceVerifier.seen("op1", nonce));
    assertEquals(NonceVerifier.SEEN, _nonceVerifier.seen("op1", nonce));

    assertEquals(NonceVerifier.OK, _nonceVerifier.seen("op2", nonce));
  }