@Test
public void maxDepth() throws AttributeNotFoundException, NoSuchFieldException, IllegalAccessException {

    setOptionsViaReflection("maxDepth",2);
    Map result = (Map) converter.extractObject(new SelfRefBean1(), new Stack<String>(), true);
    String c = (String) ((Map) result.get("bean2")).get("bean1");
    assertTrue("Recurence detected",c.contains("bean1: toString"));
}