@Test
public void testGetPatternsWhenCurrentPatternIsNull() {

    when(plugin.getPatterns()).thenReturn(fakePatterns());
    final Set<PatternWrapper> patterns = page.getPatterns();
    assertEquals(2,
                 patterns.size());
}