### Question:
BackgroundJob implements Callable<T> { public void logWithTiming(final String message, final String timingKey) { final String messageWithTime = String.format("%5sms %s", jobTiming.getEllapsedMillis(), message ); log(message); LOGGER.info(messageWithTime + " for job " + getTitle()); jobTiming.notifyStart(timingKey); }  void log(final String message); void logComplete(); void logWithTiming(final String message, final String timingKey); String getLog(); JobStatus getStatus(); void setStatus(final JobStatus status); Future<T> getFuture(); void setFuture(final Future<T> future); void setId(final long id); Long getId(); void setUUID(final UUID uuid); UUID getUUID(); List<ResultUrl> getUrls(); void addUrl(final String url, final String text); void addUrl(final String url, final String text, final String target); void addUrl(final ResultUrl url); String getEndMessage(); void setEndMessage(final String endMessage); @CheckForNull String getErrorMessage(); Throwable getError(); void setError(final Throwable error); long getCreatedTime(); Map<String, Long> getTimings(); String toString(); boolean isRunning(); abstract String getTitle(); abstract String getUsername(); JobType getJobType(); void logFailedJob(final Throwable t); void logPartialSuccess(final AutoPromoteFailedException e); @Override T call(); @Nonnull JobInfo getJobInfo();  }### Answer:
@Test public void logWithTiming() { assertThat(job.getTimings()).isEmpty(); job.logWithTiming("hello", "greet"); assertThat(job.getLog()).isEqualTo("hello\n"); assertThat(job.getTimings()).containsKeys("init"); job.logComplete(); assertThat(job.getTimings()).containsKeys("init", "greet"); }