layout.initialize(root, fullExtent, fullExtent);
layout.initialize(null, root, fullExtent, fullExtent);
	public static void testBasic()	{		// 100 seconds in the root		TestCall rootCall = new TestCall("root", 1, 100);		TestCall mainCall = new TestCall("main", 1, 70);		TestCall eventsCall = new TestCall("events", 1, 30);		rootCall.addChild(mainCall);		rootCall.addChild(eventsCall);		TestCall dbOpenCall = new TestCall("dbOpen", 1, 40);		TestCall dbCloseCall = new TestCall("dbClose", 1, 5);		TestCall dbInitCall = new TestCall("dbInit", 1, 5);		mainCall.addChild(dbOpenCall);		mainCall.addChild(dbCloseCall);		mainCall.addChild(dbInitCall);		CallAdapter root = new CallAdapter(rootCall);		CallAdapter main = new CallAdapter(mainCall);		CallAdapter events = new CallAdapter(eventsCall);		CallAdapter dbOpen = new CallAdapter(dbOpenCall);		CallAdapter dbClose = new CallAdapter(dbCloseCall);		CallAdapter dbInit = new CallAdapter(dbInitCall);		assertion(main.getExclusiveTime(TimeMeasure.TotalTime) == 20, "main.timeInSelf should be 20, is " + main.getExclusiveTime(TimeMeasure.TotalTime));		assertion(dbOpen.getDepth() == 2, "dbOpen.depth should be 2");		assertion(dbOpen.getExclusiveTime(TimeMeasure.TotalTime) == 40, "dbOpen.timeInSelf should be 40");		assertion(main.getExclusiveTime(TimeMeasure.TotalTime) == 20, "main.timeInSelf should be 20");		assertion(main.getTimeInChildren(TimeMeasure.TotalTime) == 50, "main.timeInChildren should be 50");		assertion(main.getInclusiveTimeFractionOfParentInclusiveTime(TimeMeasure.TotalTime) == 0.7, "main.fractionOfParentTime should be 0.7");		assertion(dbOpen.getInclusiveFractionOfParentChildTimes(TimeMeasure.TotalTime) == 0.8, "dbOpen.fractionOfChildTimes should be 0.8");		assertion(dbOpen.getInclusiveTimeFractionOfParentInclusiveTime(TimeMeasure.TotalTime) == 4 / 7.0, "dbOpen.fractionOfChildTimes should be " + ( 4 / 7.0 ));		Rectangle2D.Double fullExtent = new Rectangle2D.Double(0, 0, 1.0, 1.0);		Rectangle2D.Double leftHalf = new Rectangle2D.Double(0, 0, 0.5, 1.0);				RectangleLayout layout = new RectangleLayout(TimeMeasure.TotalTime);		layout.initialize(root, fullExtent, fullExtent);		assertRectangle(layout.getExtent(), new Rectangle2D.Double(0, 0, 1, 1));				layout.initialize(main, fullExtent, fullExtent);		assertRectangle(layout.getExtent(), new Rectangle2D.Double(0, 0, 0.7, 1));		assertRectangle(layout.getRemainderExtent(layout.getExtent()), new Rectangle2D.Double(0.7, 0, 0.3, 1));		layout.initialize(dbOpen, fullExtent, fullExtent);		assertRectangle(layout.getExtent(), new Rectangle2D.Double(0, 0, 0.8, 1));		assertRectangle(layout.getRemainderExtent(layout.getExtent()), new Rectangle2D.Double(0.8, 0, 0.2, 1));		// Should occupy the top 50% of the remaining triangle		Rectangle2D.Double remainder = layout.getRemainderExtent(layout.getExtent());		layout.initialize(dbClose, fullExtent, remainder);		assertRectangle(layout.getExtent(), new Rectangle2D.Double(0.8, 0.5, 0.2, 0.5));		assertRectangle(layout.getRemainderExtent(layout.getExtent()), new Rectangle2D.Double(0.8, 0, 0.2, 0.5));		// Rendered area should the same fraction of the Extent as the fractionOfParent / fractionOfChild		assertion(equal(area(layout.getRectangle(layout.getExtent())) / area(layout.getExtent()), 4 / 7.0 / 0.8), "Incorrect area ratio");				System.out.println(layout.getRectangle(layout.getExtent()));	}