assertEquals( object1 + " is not equal to " + object2,
object1,
object2 );
if ( object1 instanceof ObjectSource) {
final ObjectSource source1 = (ObjectSource) object1;
final ObjectSource source2 = (ObjectSource) object2;
final ObjectSink[] list1 = source1.getSinkPropagator().getSinks();
final ObjectSink[] list2 = source2.getSinkPropagator().getSinks();
assertEquals( object1.getClass() + " nodes have different number of sinks",
list1.length,
list2.length );
for ( int i = 0, size = list1.length; i < size; i++ ) {
nodesEquals( list1[i],
list2[i] );
}
} else if ( object1 instanceof LeftTupleSource) {
final LeftTupleSource source1 = (LeftTupleSource) object1;
final LeftTupleSource source2 = (LeftTupleSource) object2;
final LeftTupleSink[] list1 = source1.getSinkPropagator().getSinks();
final LeftTupleSink[] list2 = source2.getSinkPropagator().getSinks();
assertEquals( object1.getClass() + " nodes have different number of sinks",
list1.length,
list2.length );