@Test
public void testTokenWithExtraArgsAfterSignature() {

    RoleToken token = new RoleToken("v=Z1;d=coretech;r=role1,role2;s=signature;d=sports;r=api");
    assertEquals(token.getDomain(), "coretech");
    assertNotNull(token.getRoles());
    assertEquals(token.getRoles().size(), 2);
    assertTrue(token.getRoles().contains("role1"));
    assertTrue(token.getRoles().contains("role2"));
    assertEquals(token.getVersion(), "Z1");
    assertEquals(token.getSignature(), "signature;d=sports;r=api");
    assertEquals(token.getUnsignedToken(), "v=Z1;d=coretech;r=role1,role2");
}