IdGenerator idGenerator = ruleBase.getReteooBuilder().getIdGenerator();
final Rete source = new Rete((InternalRuleBase) ruleBase);
ObjectTypeNode objectTypeNode = new ObjectTypeNode( idGenerator.getNextId(),
this.entryPoint,
new ClassObjectType( String.class ),
buildContext );
assertFalse( objectTypeNode.isAssignableFrom( new ClassObjectType( new Object().getClass() ) ) );
assertFalse( objectTypeNode.isAssignableFrom( new ClassObjectType( new Integer( 5 ).getClass() ) ) );
assertTrue( objectTypeNode.isAssignableFrom( new ClassObjectType( "string".getClass() ) ) );
objectTypeNode = new ObjectTypeNode( idGenerator.getNextId(),
this.entryPoint,
new ClassObjectType( Object.class ),
buildContext );
assertTrue( objectTypeNode.isAssignableFrom( new ClassObjectType( new Object().getClass() ) ) );
assertTrue( objectTypeNode.isAssignableFrom( new ClassObjectType( new Integer( 5 ).getClass() ) ) );
assertTrue( objectTypeNode.isAssignableFrom( new ClassObjectType( "string".getClass() ) ) );
}