@Test
public void testGetAllScopes() {

  SingleAuthScopeExpression expression1 = mock(SingleAuthScopeExpression.class);
  when(expression1.getAllScopes()).thenReturn(new String[] { "scope0" });
  SingleAuthScopeExpression expression2 = mock(SingleAuthScopeExpression.class);
  when(expression2.getAllScopes()).thenReturn(new String[] { "scope1" });
  SingleAuthScopeExpression expression3 = mock(SingleAuthScopeExpression.class);
  when(expression3.getAllScopes()).thenReturn(new String[] { "scope0", "scope2" });
  ConjunctAuthScopeExpression expression =
      new ConjunctAuthScopeExpression(
          ImmutableList.<SingleAuthScopeExpression>of(expression1, expression2, expression3));
  assertThat(ImmutableList.copyOf(expression.getAllScopes()))
      .containsExactly("scope0", "scope1", "scope2");
}