@Test
public void testUserToken() throws CryptoException {

    long issueTime = System.currentTimeMillis() / 1000;
    PrincipalToken userTokenToValidate = createUserToken(issueTime);
    // Validate all input data
    assertEquals(userTokenToValidate.getVersion(), usrVersion);
    assertEquals(userTokenToValidate.getDomain(), usrDomain);
    assertEquals(userTokenToValidate.getName(), usrName);
    assertNull(userTokenToValidate.getHost());
    assertEquals(userTokenToValidate.getSalt(), salt);
    // Validate the signature and that expiration time had not elapsed
    assertTrue(userTokenToValidate.validate(servicePublicKeyStringK0, 300, false));
}