@Test
public void testGetAvailableScopes() {

    DispatchRequest enclosedRequest = createMock(DispatchRequest.class);
    expect(enclosedRequest.getAvailableScopes()).andReturn(Collections.singletonList("parent"));
    replay(enclosedRequest);
    context = new FreemarkerRequest(enclosedRequest, env);
    assertArrayEquals(new String[] { "parent", "page" }, //
            context.getAvailableScopes().toArray());
    verify(enclosedRequest);
}