@Test
public void appliesTo() {

    assertFalse(model.appliesTo(null));
    assertTrue(model.appliesTo(page));
    assertTrue(model.appliesTo(resource));
    when(config.getPagePathPattern()).thenReturn(pattern);
    assertFalse(model.appliesTo(page));
    assertTrue(model.appliesTo(resource));
}