LogService { public static Logger getLogger() { String name = StackLocator.getInstance().getCallerClass(2).getName(); return getLogger(name); } private  LogService(); static Logger getLogger(); static Logger getLogger(String name); static Logger getLogger(Class<?> clazz);  }
@Test public void getLoggerReturnsFastLogger() { assertThat(LogService.getLogger()).isInstanceOf(FastLogger.class); }
@Test public void getLoggerReturnsLoggerWithCallerClassName() { assertThat(LogService.getLogger().getName()).isEqualTo(getClass().getName()); }
@Test public void getLoggerReturnsLoggerWithGeodeMessageFactory() { Logger logger = LogService.getLogger(); MessageFactory messageFactory = logger.getMessageFactory(); assertThat(messageFactory).isInstanceOf(GemFireParameterizedMessageFactory.class); }
@Test public void getLoggerNameReturnsLoggerWithSpecifiedName() { assertThat(LogService.getLogger(APPLICATION_LOGGER_NAME).getName()) .isEqualTo(APPLICATION_LOGGER_NAME); }
@Test public void getLoggerNameReturnsLoggerWithGeodeMessageFactory() { Logger logger = LogService.getLogger(APPLICATION_LOGGER_NAME); MessageFactory messageFactory = logger.getMessageFactory(); assertThat(messageFactory).isInstanceOf(GemFireParameterizedMessageFactory.class); }