### Question:
ProcessUtils { public static boolean isMainProcess(Application application) { int pid = android.os.Process.myPid(); String processName = ""; ActivityManager manager = (ActivityManager) application.getSystemService (Context.ACTIVITY_SERVICE); for (ActivityManager.RunningAppProcessInfo process : manager.getRunningAppProcesses()) { if (process.pid == pid) { processName = process.processName; } } return application.getPackageName().equals(processName); }  static String myProcessName(Context context); static int getCurrentPid(); static int getCurrentUid(); static boolean isMainProcess(Application application);  }### Answer:
@Test public void isMainProcess() { boolean isMainProcess = ProcessUtils.isMainProcess(ApplicationProvider.getApplicationContext()); Assert.assertTrue(isMainProcess); }