LnImpl implements LnInterface { protected String formatArgs(final String s, Object... args) { if( args != null && args.length == 0 ) { return s; } else { return String.format(s,args); } } LnImpl(); @Inject  LnImpl(Application context); @Override int v(Throwable t); @Override int v(Object s1, Object... args); @Override int v(Throwable throwable, Object s1, Object[] args); @Override int d(Throwable t); @Override int d(Object s1, Object... args); @Override int d(Throwable throwable, Object s1, Object... args); @Override int i(Throwable t); @Override int i(Throwable throwable, Object s1, Object... args); @Override int i(Object s1, Object... args); @Override int w(Throwable t); @Override int w(Throwable throwable, Object s1, Object... args); @Override int w(Object s1, Object... args); @Override int e(Throwable t); @Override int e(Throwable throwable, Object s1, Object... args); @Override int e(Object s1, Object... args); @Override boolean isDebugEnabled(); @Override boolean isVerboseEnabled(); @Override String logLevelToString(int loglevel); @Override int getLoggingLevel(); @Override void setLoggingLevel(int level); int println(int priority, String msg );  }
@Test public void shouldFormatArgs_whenArgsAreNull() { final String s = "Message: %s"; final String expected = "Message: null"; assertThat(new LnImpl().formatArgs(s, null), equalTo(expected)); }
@Test public void shouldFormatArgs_whenArgsIs0Length() { final String s = "Message: %s"; final String expected = "Message: %s"; assertThat(new LnImpl().formatArgs(s), equalTo(expected)); }