@Test
public void testEncodeComplexScope() {

  assertEquals(ImmutableList.of("scope_1 scope_2", "scope_1 scope_3"),
      AuthScopeExpressions.encode(
          new DisjunctAuthScopeExpression(ImmutableList.<AbstractAuthScopeExpression>of(
              new ConjunctAuthScopeExpression(ImmutableList.<SingleAuthScopeExpression>of(
                  new SingleAuthScopeExpression("scope_1"),
                  new SingleAuthScopeExpression("scope_2"))),
              new ConjunctAuthScopeExpression(ImmutableList.<SingleAuthScopeExpression>of(
                  new SingleAuthScopeExpression("scope_1"),
                  new SingleAuthScopeExpression("scope_3")))))));
}