Merge "Add instrumentation to test NetworkAgent."