### Question:
InterProceduralControlFlowDistanceCalculator extends ControlFlowDistanceCalculator { protected static ControlFlowDistance getNonRootDistance( ExecutionResult result, Branch branch, boolean value) { if (branch == null){ throw new IllegalStateException( "expect this method only to be called if this goal does not try to cover the root branch"); } String className = branch.getClassName(); String methodName = branch.getMethodName(); ControlFlowDistance r = new ControlFlowDistance(); r.setApproachLevel(GraphPool.getInstance(BotsingTestGenerationContext.getInstance().getClassLoaderForSUT()).getActualCFG("IntegrationTestingGraph","methodsIntegration").getDiameter() + 1); for (MethodCall call : result.getTrace().getMethodCalls()) { ControlFlowDistance d2; Set<Branch> handled = new HashSet<Branch>(); d2 = getNonRootDistance(result, call, branch, value, className, methodName, handled); if (d2.compareTo(r) < 0) { r = d2; } } return r; }  static ControlFlowDistance getDistance( ExecutionResult result, Branch branch, boolean value, String className, String methodName);  }### Answer:
@Test(expected = IllegalStateException.class) public void testIllegalNullBranchInNonRootMethod(){ InterProceduralControlFlowDistanceCalculator.getNonRootDistance(null,null,true); }