### Question:
JobWatcher extends Watcher<V1Job> implements WatchListener<V1Job> { static boolean isFailed(V1Job job) { if (job == null) { return false; } V1JobStatus status = job.getStatus(); if (status != null) { if (status.getFailed() != null && status.getFailed() > 0) { LOGGER.severe(MessageKeys.JOB_IS_FAILED, job.getMetadata().getName()); return true; } } return false; } private  JobWatcher(
      String namespace,
      String initialResourceVersion,
      WatchTuning tuning,
      AtomicBoolean isStopping); static @Nonnull JobWatcher getOrCreateFor(Domain domain); @Override String getNamespace(); static JobWatcher create(
      ThreadFactory factory,
      String ns,
      String initialResourceVersion,
      WatchTuning tuning,
      AtomicBoolean isStopping); static boolean isComplete(V1Job job); @Override WatchI<V1Job> initiateWatch(WatchBuilder watchBuilder); void receivedResponse(Watch.Response<V1Job> item); Step waitForReady(V1Job job, Step next);  }### Answer:
@Test public void whenJobHasNoStatus_reportNotFailed() { assertThat(JobWatcher.isFailed(cachedJob), is(false)); }
@Test public void whenJobHasFailedCount_reportFailed() { cachedJob.status(new V1JobStatus().failed(1)); assertThat(JobWatcher.isFailed(cachedJob), is(true)); }