public void handleExistingJobStatus() throws Exception {
pk = new PinsetterKernel(config, jfactory, jlistener, jcurator, sfactory);
JobStatus status = mock(JobStatus.class);
when(jcurator.find(startsWith(
Util.getClassName(JobCleaner.class)))).thenReturn(status);
when(jcurator.create(any(JobStatus.class))).thenThrow(new EntityExistsException());
pk.startup();
verify(sched).start();
// this test will have 2 jobs each throwing an exception, we should
// updated both statuses, then schedule both.
verify(jcurator, atMost(2)).merge(any(JobStatus.class));