@Test
public void test_getAllComponentsByNamespaceCode_not_exists() throws Exception{

    when(dataObjectService.findMatching(Matchers.argThat(
            new ClassOrSubclassMatcher<ComponentBo>(ComponentBo.class)),
            any(QueryByCriteria.class))).thenReturn(null);
    when(dataObjectService.findMatching(Matchers.argThat(
            new ClassOrSubclassMatcher<DerivedComponentBo>(DerivedComponentBo.class)),
            any(QueryByCriteria.class))).thenReturn(null);
    List<Component> components = getComponentService().getAllComponentsByNamespaceCode("blah");
    assertTrue("getAllComponentsByNamespaceCode not retrieved", components != null && components.isEmpty());
    verify(dataObjectService,times(1)).findMatching(Matchers.argThat(
            new ClassOrSubclassMatcher<ComponentBo>(ComponentBo.class)), any(QueryByCriteria.class));
    verify(dataObjectService,times(1)).findMatching(Matchers.argThat(
            new ClassOrSubclassMatcher<DerivedComponentBo>(DerivedComponentBo.class)), any(QueryByCriteria.class));
}