@Test
public void testRuleModeller() throws Exception {

    when(brlActionPlugin.getRuleModel()).thenReturn(new RuleModel());
    when(brlActionPlugin.tableFormat()).thenReturn(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY);
    when(brlActionPlugin.getRuleModellerActionPlugins()).thenReturn(Collections.singletonList(ruleModellerActionPlugin));
    when(brlActionPlugin.getRuleModellerConfiguration()).thenReturn(mock(RuleModellerConfiguration.class));
    when(presenter.getDataModelOracle()).thenReturn(mock(AsyncPackageDataModelOracle.class));
    final RuleModeller ruleModeller = brlActionPage.ruleModeller();
    assertNotNull(ruleModeller);
    assertEquals(brlActionPlugin.getRuleModel(), ruleModeller.getModel());
    assertEquals(Collections.singletonList(ruleModellerActionPlugin), ruleModeller.getActionPlugins());
    assertEquals(presenter.getDataModelOracle(), ruleModeller.getDataModelOracle());
    assertTrue(ruleModeller.getWidgetFactory() instanceof TemplateModellerWidgetFactory);
    assertFalse(ruleModeller.isReadOnly());
}