LoggerImpl implements Logger { @Override public void exit(String methodName) { logger.trace(LogMarker.EXIT.getValue(), methodName, (Object)null); } LoggerImpl(Class<?> clazz);  LoggerImpl(org.slf4j.Logger logger); @Override void setClientId(String clientId); @Override void info(String message); @Override void warning(String message); @Override void error(String message); @Override void error(String message, Throwable throwable); @Override void entry(String methodName); @Override void entry(String methodName, Object... objects); @Override void entry(Object source, String methodName); @Override void entry(Object source, String methodName, Object... objects); @Override void exit(String methodName); @Override void exit(String methodName, Object result); @Override void exit(Object source, String methodName); @Override void exit(Object source, String methodName, Object result); @Override void data(String methodName); @Override void data(String methodName, Object... objects); @Override void data(Object source, String methodName); @Override void data(Object source, String methodName, Object... objects); @Override void throwing(String methodName, Throwable throwable); @Override void throwing(Object source, String methodName, Throwable throwable); @Override void ffdc(String methodName, FFDCProbeId probeId, Throwable throwable, Object... data); @Override void ffdc(Object source, String methodName, FFDCProbeId probeId, Throwable throwable, Object... data);  }
@Test public void testExit() { final MockLogger logger = new MockLogger("testExit"); final Logger testLogger = LoggerFactory.getLogger(logger); final String methodName = "testExitMethod"; testLogger.exit(methodName); MockEvent event = logger.getEvent(); assertEquals("Unexpected type", "trace", event.type); assertEquals("Unexpected marker", LogMarker.EXIT.getValue(), event.marker); assertEquals("Unexpected method name", methodName, event.message); assertNull("Unexpected throwable", event.throwable); assertNull("Unexpected object", event.args[0]); assertEquals("Unexpected args", 1, event.args.length); testLogger.exit(this, methodName); event = logger.getEvent(); assertEquals("Unexpected type", "trace", event.type); assertEquals("Unexpected marker", LogMarker.EXIT.getValue(), event.marker); assertEquals("Unexpected method name", methodName, event.message); assertNull("Unexpected throwable", event.throwable); assertEquals("Unexpected object", this, event.args[0]); assertEquals("Unexpected args", 1, event.args.length); Integer result1 = 123; testLogger.exit(methodName, result1); event = logger.getEvent(); assertEquals("Unexpected type", "trace", event.type); assertEquals("Unexpected marker", LogMarker.EXIT.getValue(), event.marker); assertEquals("Unexpected method name", methodName, event.message); assertNull("Unexpected throwable", event.throwable); assertNull("Unexpected object", event.args[0]); assertEquals("Unexpected arg1", result1, event.args[1]); assertEquals("Unexpected args", 2, event.args.length); ProcessBuilder result2 = new ProcessBuilder(); testLogger.exit(this, methodName, result2); event = logger.getEvent(); assertEquals("Unexpected type", "trace", event.type); assertEquals("Unexpected marker", LogMarker.EXIT.getValue(), event.marker); assertEquals("Unexpected method name", methodName, event.message); assertNull("Unexpected throwable", event.throwable); assertEquals("Unexpected object", this, event.args[0]); assertEquals("Unexpected arg1", result2, event.args[1]); assertEquals("Unexpected args", 2, event.args.length); try { event = logger.getEvent(); fail("Unexpected event: "+event); } catch(NoSuchElementException e) { } }