nf.add(rtcriteria);
Collection<KamNode> nodes = testKAM.getNodes(nf);
assertNotNull(nodes);
assertEquals(2, nodes.size());
Iterator<KamNode> nodeIt = nodes.iterator();
KamNode n1 = nodeIt.next();
assertEquals(KINASE_ACTIVITY, n1.getFunctionType());
assertEquals(ABUNDANCE, n1.getFunctionType().getReturnType());
KamNode n2 = nodeIt.next();
assertEquals(BIOLOGICAL_PROCESS, n2.getFunctionType());
assertEquals(ReturnType.BIOLOGICAL_PROCESS, n2.getFunctionType()
.getReturnType());
// Test include of PROTEIN_ABUNDANCE AND COMPLEX_ABUNDANCE function type
// criterion yields 3 nodes
nf = testKAM.createNodeFilter();
FunctionTypeFilterCriteria ftcriteria =
new FunctionTypeFilterCriteria();
ftcriteria.setInclude(true);
ftcriteria.add(PROTEIN_ABUNDANCE);
ftcriteria.add(COMPLEX_ABUNDANCE);
nf.add(ftcriteria);
nodes = testKAM.getNodes(nf);
assertNotNull(nodes);
assertEquals(3, nodes.size());
nodeIt = nodes.iterator();
n1 = nodeIt.next();
assertEquals(COMPLEX_ABUNDANCE, n1.getFunctionType());
n2 = nodeIt.next();
assertEquals(PROTEIN_ABUNDANCE, n2.getFunctionType());
KamNode n3 = nodeIt.next();
assertEquals(PROTEIN_ABUNDANCE, n3.getFunctionType());
}