Daemon { public void spawn_adb() { Intent i = new Intent(context, ADBService.class); i.putExtra("cmd", execCMD); Log.d("AdbDaemon", "Spawn ADB intent service"); context.startService(i); } Daemon(Context context, Point screenDimensions); void writeFakeInputToFilesystem(); void spawn_adb();  }
@Test public void spawn_adbHappypathTest() { Daemon d = new Daemon(context, new Point(0, 0)); d.spawn_adb(); }
@Test(expected = NullPointerException.class) public void spawn_adbNoContextTest() { Daemon d = new Daemon(null, new Point(0, 0)); d.spawn_adb(); }