public void test() {
InputStream is = getClass().getResourceAsStream("/federation_token.xml");
UserAndSessionCredentials expected = expected();
UserAndSessionCredentialsHandler handler = injector.getInstance(UserAndSessionCredentialsHandler.class);
UserAndSessionCredentials result = factory.create(handler).parse(is);
assertEquals(result, expected);
assertEquals(result.getUser(), expected.getUser());
assertEquals(result.getPackedPolicySize(), expected.getPackedPolicySize());