@Test(expectedExceptions = InvalidEventException.class, expectedExceptionsMessageRegExp = "Cycle detected in event data:.*")
public void testChainedCircularEvent()
throws Exception
{
ChainedPart a = new ChainedPart("a");
ChainedPart b = new ChainedPart("b");
ChainedPart c = new ChainedPart("c");
a.setPart(b);
b.setPart(c);
c.setPart(a);
ChainedCircularEventClass event = new ChainedCircularEventClass(a);
eventWriter.writeEvents(createEventGenerator(ImmutableList.of(event)), null, nullOutputStream());
}