### Question:
TraceeContextInjector { public void injectContext(Trigger trigger) { injectContext(trigger.getJobDataMap()); } TraceeContextInjector();  TraceeContextInjector(final String profile);   TraceeContextInjector(final TraceeBackend backend, final String profile); void injectContext(Trigger trigger); void injectContext(JobDetail jobDetail); void injectContext(JobDataMap jobDataMap);  }### Answer:
@Test public void skipTpicProcessingIfBackendIsEmpty() { final JobDataMap dataMap = new JobDataMap(); unit.injectContext(dataMap); assertThat(dataMap.size(), is(0)); }
@Test public void addTpicHeaderToJobDataMapIfBackendContainsValues() { backend.put("testKey", "testValue"); final JobDataMap dataMap = new JobDataMap(); unit.injectContext(dataMap); assertThat(dataMap, hasKey(TPIC_HEADER)); assertThat((Map<String, String>) dataMap.get(TPIC_HEADER), hasEntry("testKey", "testValue")); }
@Test public void addTpicHeaderToJobDataMapOfTriggerIfBackendContainsValues() { backend.put("testKey", "testValue"); final Trigger trigger = TriggerBuilder.newTrigger().build(); unit.injectContext(trigger); assertThat(trigger.getJobDataMap(), hasKey(TPIC_HEADER)); assertThat((Map<String, String>) trigger.getJobDataMap().get(TPIC_HEADER), hasEntry("testKey", "testValue")); }
@Test public void addTpicHeaderToJobDataMapOfJobDetailsIfBackendContainsValues() { backend.put("testKey", "testValue"); final JobDetail jobDetail = JobBuilder.newJob(NoopJob.class).build(); unit.injectContext(jobDetail); assertThat(jobDetail.getJobDataMap(), hasKey(TPIC_HEADER)); assertThat((Map<String, String>) jobDetail.getJobDataMap().get(TPIC_HEADER), hasEntry("testKey", "testValue")); }