### Question:
FrameworkScheduler extends Scheduler { boolean onStartJob(JobParameters params) { SchedulerConstraint constraint; try { constraint = fromBundle(params.getExtras()); } catch (Exception e) { JqLog.e(e, "bad bundle from framework job scheduler start callback."); return false; } JqLog.d("[FW Scheduler] start job %s %d", constraint, params.getJobId()); constraint.setData(params); return start(constraint); } FrameworkScheduler(Class<? extends FrameworkJobSchedulerService> serviceImpl); @SuppressLint("SwitchIntDef") @Override void request(SchedulerConstraint constraint); @Override void onFinished(SchedulerConstraint constraint, boolean reschedule); @Override void cancelAll();  }### Answer:
@Test public void badBundleOnStart() { JobParameters params = mock(JobParameters.class); PersistableBundle badBundle = mock(PersistableBundle.class); when(badBundle.getString(anyString(), anyString())).thenThrow(new NullPointerException()); when(badBundle.getString(anyString())).thenThrow(new NullPointerException()); assertThat(fwScheduler.onStartJob(params), is(false)); }