@Test
public void testGetUnsignedTokenFromSignedToken() {

    String [] signedTokens = {
        // this is a RoleToken
        "v=Z1;d=sports;r=storage.tenant.weather.updater;p=user.joe;a=aAkjbbDMhnLX;t=1447361682;e=1447361692;k=0;i=127.0.0.1;s=IKT3MhlfxMajh9KqvNFhuJwyHQB8M9qVmgok389wmcRZ_kqMKaf72sC3.u0Qh4VlWk.DReX8y17V.qV0wnGwNPwfUBKG9SR88SL_MBvSaVHst9wQN20v.gCzFf8IXzehEFID5tjCIFAmaLEn71bCS4oKMiPEx4FtP4OdYdeL_d4",
        "v=Z1;d=sports;r=storage.tenant.weather.updater,fantasy.tenant.sports.admin,fantasy.tenant.sports.reader,fantasy.tenant.sports.writer,fantasy.tenant.sports.scanner;p=coretech.storage;a=aAkjbbDMhnLX;t=1447361682;e=1447361692;k=0;i=127.0.0.1;s=C68KMYxivWqTTg8YWGc1aXUkgbgHOQDH8iRePZWY9aLUidkEQSvBkveRFi4Sap6q800Qt1GVnF6aN1OMk6YNIc_0E_xdRj9LJriS6Qq6ss79y76J_OSGSIwBXNeDWP6fq1SPW_MlUiXPE3TJojG_W8C0lwtWRppP0UZGAjzs4bc-",
        // this is a PrincipalToken
        "v=S1;d=cd.project;n=nfl;h=somehost.somecompany.com;a=saltvalue;t=1447361732;e=1447361742;s=NlISFQqXz1ji8zdVdGKjKZHJBloo11S.tXLo6t.GmnCt9S6c8AATzzZ2XdMeRlX2b0ykRiS0yjmrXg.grMPin3cHiB_FdLL05.w29OUBgxJr71.11_09iOoqy0ivGqyXoSO2GQbtXJfQeJ6HFHWPef1xyNV0Fswd8e6HQtyxGLA-",
        "v=S1;d=cd;n=12345;h=somehost.somecompany.com;a=saltvalue;t=1447361732;e=1447361742;k=0;s=lg5JMqJb9Hd5Vd12VdC2d.Pu0TSlynGtulV7GjT9RQsSFaTsvabLPIehNT7iJczVq_POzWTA7HYRe7ZNGfGTe6P26C_qECX._ylbYVznLnZSFW3IQFMMPc2yjiE_twFgXAVtT1sWHjcf8zxK4RVij_8vziTiUrqU_ExioO019XE-",
    };
    for (String signedToken: signedTokens) {
        String unsignedToken = Token.getUnsignedToken(signedToken);
        assertNotEquals(unsignedToken, signedToken);
        assertTrue(unsignedToken.length() < signedToken.length());
        assertTrue(signedToken.startsWith(unsignedToken));
    }
}