NullMessageProducer implements MessageProducer { @Override public Transaction newTransaction(String type, String name) { return NULL_TRANSACTION; }  @Override void logError(Throwable cause); @Override void logError(String message, Throwable cause); @Override void logEvent(String type, String name); @Override void logEvent(String type, String name, String status, String nameValuePairs); @Override Transaction newTransaction(String type, String name);  }
@Test public void testNewTransaction() throws Exception { String someType = "someType"; String someName = "someName"; assertTrue(messageProducer.newTransaction(someType, someName) instanceof NullTransaction); }