### Question:
SimpleCollector { protected Timer.Sample timerStart(String consumerName, String lifecycle, String propertyPrefix) { if (isTurnedOff(consumerName, lifecycle, propertyPrefix)) return null; return timerStart(consumerName, lifecycle); } SimpleCollector(); @LifeCycle(value=ProcessStep.Pending) void pending(MessageRunnable mr); @LifeCycle(value=ProcessStep.Validating) void validating(MessageRunnable mr); @LifeCycle(value=ProcessStep.Invalid) void invalid(MessageRunnable mr); @LifeCycle(value=ProcessStep.Processing) void processing(MessageRunnable mr); @LifeCycle(value=ProcessStep.Complete) void complete(MessageRunnable mr); @LifeCycle(value=ProcessStep.Error) void error(MessageRunnable mr); @LifeCycle(value=ProcessStep.Retrying) void retry(MessageRunnable mr); @LifeCycle(value=ProcessStep.MaxRetriesExceeded) void maxRetries(MessageRunnable mr);  }### Answer:
@Test public void testTimerStart() { SimpleCollector ddc = new SimpleCollector(); assertNull(ddc.timerStart(null, null)); assertNull(ddc.timerStart("", "")); assertNull(ddc.timerStart(null, "abc")); assertNull(ddc.timerStart("", "pending")); assertNull(ddc.timerStart("pending", "")); assertNull(ddc.timerStart("pending", null)); final var pq = ddc.timerStart("queue", "pending"); var vq = ddc.timerStart("queue", "validate"); assertNotNull(pq); assertNotSame(pq, vq); var pq2 = ddc.timerStart("queue", "pending"); assertSame(pq, pq2); Thread thread = new Thread() { public void run() { var ntq = ddc.timerStart("queue", "pending"); assertNotNull(pq); assertNotNull(ntq); assertNotSame(pq, ntq); } }; thread.start(); }