function handler1 (oEvent) {
			oBinding.detachChange(handler1);

			// contexts should be now loaded
			var aContexts = oBinding.getRootContexts(0, 10);
			var oContext;

			assert.equal(aContexts.length, 9, "Retrieved contexts after sorting length = 9");
			assert.equal(oBinding.getChildCount(null), 9, "Internal rootContexts length");

			oContext = aContexts[0];
			assert.equal(oModel.getProperty("FirstName", oContext), "Steven", "TreeBinding root context[0] is correct (Steven)");

			oContext = aContexts[8];
			assert.equal(oModel.getProperty("FirstName", oContext), "Andrew", "TreeBinding root context[3] is correct (Andrew)");

			// retrieve children for Andrew
			oBinding.attachChange(handler2);
			aContexts = oBinding.getNodeContexts(aContexts[8], 0, 5);
		}
//change handler for getRootContexts() call
change handler for getRootContexts() call
change handler for getRootContexts () call
function handler1 (oEvent) {
			oBinding.detachChange(handler1);
			var aContexts = oBinding.getRootContexts(0, 10);
			var oContext;
			assert.equal(aContexts.length, 9, "Retrieved contexts after sorting length = 9");
			assert.equal(oBinding.getChildCount(null), 9, "Internal rootContexts length");
			oContext = aContexts[0];
			assert.equal(oModel.getProperty("FirstName", oContext), "Steven", "TreeBinding root context[0] is correct (Steven)");
			oContext = aContexts[8];
			assert.equal(oModel.getProperty("FirstName", oContext), "Andrew", "TreeBinding root context[3] is correct (Andrew)");
			oBinding.attachChange(handler2);
			aContexts = oBinding.getNodeContexts(aContexts[8], 0, 5);
		}
function handler1 ( oEvent ) { oBinding . detachChange ( handler1 ) ; var aContexts = oBinding . getRootContexts ( 0 , 10 ) ; var oContext ; assert . equal ( aContexts . length , 9 , "Retrieved contexts after sorting length = 9" ) ; assert . equal ( oBinding . getChildCount ( null ) , 9 , "Internal rootContexts length" ) ; oContext = aContexts [ 0 ] ; assert . equal ( oModel . getProperty ( "FirstName" , oContext ) , "Steven" , "TreeBinding root context[0] is correct (Steven)" ) ; oContext = aContexts [ 8 ] ; assert . equal ( oModel . getProperty ( "FirstName" , oContext ) , "Andrew" , "TreeBinding root context[3] is correct (Andrew)" ) ; oBinding . attachChange ( handler2 ) ; aContexts = oBinding . getNodeContexts ( aContexts [ 8 ] , 0 , 5 ) ; }
change handler for getRootContexts() call
change handler for getRootContexts () call
// contexts should be now loaded // retrieve children for Andrew