@Test
public void testGetPatternsWhenCurrentPatternIsNotNull() {

    when(plugin.getPatterns()).thenReturn(fakePatterns());
    when(plugin.patternWrapper()).thenReturn(newPattern("factType3",
                                                        "boundName3",
                                                        true));
    final Set<PatternWrapper> patterns = page.getPatterns();
    assertEquals(3,
                 patterns.size());
}