@Test
public void testAppendCatalogNodeToParent() throws URISyntaxException {
final URI whatever = null;
final InvCatalogRef catalogReference = new InvCatalogRef(null, "catalogRefName", "http://a.b");
catalogReference.setCatalog(new InvCatalogImpl("whatever", "1.0", whatever));
CatalogTreeUtils.appendCatalogNode(parentNode, getDefaultTreeModel(), catalogReference);
assertEquals(1, parentNode.getChildCount());
assertEquals(1, parentNode.getChildAt(0).getChildCount());
final DefaultMutableTreeNode child1 = (DefaultMutableTreeNode) parentNode.getChildAt(0);
assertEquals(true, child1.getUserObject() instanceof String);
assertEquals("catalogRefName", child1.getUserObject());
final DefaultMutableTreeNode child2 = (DefaultMutableTreeNode) parentNode.getChildAt(0).getChildAt(0);
assertEquals(true, child2.getUserObject() instanceof CatalogNode);
final CatalogNode catalogNode = (CatalogNode) child2.getUserObject();
assertEquals("http://a.b", catalogNode.getCatalogUri());
}