@Test
public void fromAuthorizationContext() {

    final String defaultSubjectId = "google:i-am-user";
    final AuthorizationSubject defaultSubject = AuthorizationSubject.newInstance(defaultSubjectId);
    final String otherSubjectId = "eclipse:i-am-not-google";
    final AuthorizationSubject otherSubject = AuthorizationSubject.newInstance(otherSubjectId);
    final AuthorizationContext authorizationContext = AuthorizationContext.newInstance(
            DittoAuthorizationContextType.UNSPECIFIED, defaultSubject, otherSubject);
    final DefaultUserInformation userInformation = DefaultUserInformation.fromAuthorizationContext(authorizationContext);
    assertThat(userInformation.getDefaultSubject()).contains(defaultSubjectId);
    assertThat(userInformation.getSubjects()).containsExactly(defaultSubjectId, otherSubjectId);
}