@Test
public void testAttach() throws Exception {
IdGenerator idGenerator = ruleBase.getReteooBuilder().getIdGenerator();
final Rete source = this.ruleBase.getRete();
final ObjectType objectType = new ClassObjectType(String.class);
int id = idGenerator.getNextId();
final ObjectTypeNode objectTypeNode = new ObjectTypeNode(id,
this.entryPoint,
objectType,
buildContext);
assertEquals(id,
objectTypeNode.getId());
Map<ObjectType, ObjectTypeNode> map = source.getObjectTypeNodes(EntryPointId.DEFAULT);
assertEquals(0,
map.size());
objectTypeNode.attach(buildContext);