ActorService extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { return START_NOT_STICKY; } @SuppressWarnings({"unused", "WeakerAccess"}) protected  ActorService(@NonNull String name); @SuppressWarnings({"unused", "WeakerAccess"}) protected  ActorService(@NonNull String name, long stopDelay); @SuppressWarnings({"unused", "WeakerAccess"}) protected  ActorService(@NonNull String name, long stopDelay, boolean useWakeLocks); @Override IBinder onBind(Intent intent); @Override void onCreate(); @Override int onStartCommand(Intent intent, int flags, int startId); @Override void onDestroy();  }
@Test public void onStartCommand_START_NOT_STICKY_always() { ActorService service = createService(); Assert.assertEquals(Service.START_NOT_STICKY, service.onStartCommand(new Intent(), 0, 10)); }