@Test
public void test_getActiveComponentsByNamespaceCode_with_derived() throws Exception{

    ArgumentCaptor<QueryByCriteria> argument = setupDataObjectServiceFetchComponent();
    setupDataObjectServiceFetchDerivedComponent();
    List<Component> components = getComponentService().getActiveComponentsByNamespaceCode(NAMESPACE_CODE);
    QueryByCriteria queryByCriteria = argument.getValue();
    assertTrue("Active passed as criteria for findMatching",StringUtils.contains(
            queryByCriteria.toString(),"active, true"));
    assertTrue("getAllComponentsByNamespaceCode retrieved correctly",
            components != null && components.size() == 2);
    assertTrue("Component was returned", StringUtils.equals(component.getCode(), components.get(0).getCode()));
    assertTrue("Component was returned", StringUtils.equals(derivedComponent.getCode(),
            components.get(1).getCode()));
    assertImmutableList(components);
}