@Test
public void test_translateCollections_both() throws Exception{

    GenericQueryResults.Builder builder = GenericQueryResults.Builder.create();
    GenericQueryResults.Builder builder2 = GenericQueryResults.Builder.create();
    List<DerivedComponentBo> derivedComponentBoList = new ArrayList<DerivedComponentBo>();
    derivedComponentBoList.add(derivedComponentBo);
    builder2.setResults(derivedComponentBoList);
    List<ComponentBo> componentBoList = new ArrayList<ComponentBo>();
    componentBoList.add(componentBo);
    builder.setResults(componentBoList);
    List<Component> components = componentService.translateCollections(builder.build(), builder2.build());
    assert components != null;
    assert components.size() == 2;
    assertTrue("Component fetched correctly",
            StringUtils.equals(components.get(0).getCode(),component.getCode()));
    assertTrue("Component fetched correctly",
            StringUtils.equals(components.get(1).getCode(),derivedComponent.getCode()));
    assertImmutableList(components);
}