@Test
public void testGetPatterns() throws Exception {

    final Pattern52 pattern = new Pattern52() {{
        setFactType("FactType");
        setBoundName("$fact");
    }};
    doReturn(Collections.singletonList(pattern)).when(model).getConditions();
    doReturn(pattern).when(model).getConditionPattern(eq("$fact"));
    final Set<PatternWrapper> patterns = plugin.getPatterns();
    assertEquals(1,
                 patterns.size());
    assertTrue(patterns.contains(new PatternWrapper("FactType",
                                                    "$fact",
                                                    false)));
}