Factorize custom asserts.

Also a few utilities that were in the way, and some opportunistic
cleanups.

Test: FrameworksNetTest NetworkStackTest
Change-Id: I66d0d358ab949b40e7267b5c66e36c292848bfca
diff --git a/tests/unit/Android.bp b/tests/unit/Android.bp
index 5d90a61..580659e 100644
--- a/tests/unit/Android.bp
+++ b/tests/unit/Android.bp
@@ -17,7 +17,7 @@
 android_test {
     name: "NetworkStackTests",
     certificate: "platform",
-    srcs: ["src/**/*.java"],
+    srcs: ["src/**/*.java", "src/**/*.kt"],
     test_suites: ["device-tests"],
     resource_dirs: ["res"],
     static_libs: [