@Test
public void testGetPatternsWithBRLCondition() throws Exception {

    final Pattern52 pattern = new Pattern52() {{
        setFactType("FactType");
        setBoundName("$fact");
    }};
    final BRLConditionColumn brlColumn = new BRLConditionColumn();
    final FactPattern fp = new FactPattern("AnotherFact") {{
        setBoundName("$another");
    }};
    brlColumn.setDefinition(Collections.singletonList(fp));
    doReturn(Arrays.asList(pattern,
                           brlColumn)).when(model).getConditions();
    doReturn(pattern).when(model).getConditionPattern(eq("$fact"));
    doReturn(new FactPatternPattern52Adaptor(fp)).when(model).getConditionPattern(eq("$another"));
    final Set<PatternWrapper> patterns = plugin.getPatterns();
    assertEquals(1,
                 patterns.size());
    assertTrue(patterns.contains(new PatternWrapper("FactType",
                                                    "$fact",
                                                    false)));
}