@Test public void shouldUseDefaultCode() { ApplicationArguments applicationArguments = mock(ApplicationArguments.class); when(applicationArguments.getSourceArgs()).thenReturn(new String[0]); LocaleCodeSource localeCodeSource = new LocaleCodeSource(applicationArguments); assertThat(localeCodeSource.getCode(), is(java.util.Locale.getDefault().getLanguage())); }
public String getCode() { return code; }
LocaleCodeSource { public String getCode() { return code; } }
LocaleCodeSource { public String getCode() { return code; } @Autowired  LocaleCodeSource(ApplicationArguments arguments); }
LocaleCodeSource { public String getCode() { return code; } @Autowired  LocaleCodeSource(ApplicationArguments arguments); String getCode(); }
LocaleCodeSource { public String getCode() { return code; } @Autowired  LocaleCodeSource(ApplicationArguments arguments); String getCode();  }