Mockito.doReturn(DefType.LIBRARY).when(parentDescriptor).getDefType();
Mockito.doReturn(expectedParentNamespace).when(parentDescriptor).getNamespace();
Mockito.doReturn(parentDescriptor).when(parentHandler).getDefDescriptor();
IncludeDefRefHandler handler = new IncludeDefRefHandler(parentHandler, getReader(source), source);
IncludeDefRef actualDef = handler.getElement();
assertEquals(expectedName, actualDef.getName());
assertNull(actualDef.getDescription());
assertNull(actualDef.getImports());
assertNull(actualDef.getExport());
DefDescriptor<IncludeDef> actualDesc = actualDef.getIncludeDescriptor();
assertEquals(parentDescriptor.getNamespace(), actualDesc.getNamespace());
assertEquals(expectedName, actualDesc.getName());
assertEquals(parentDescriptor, actualDesc.getBundle());
}