PluginConfiguration extends Configuration { public List<String> getAliases() { List<String> aliases = get(SystemPreference.ALIAS.getKey(), Interpreters.listFromDelimitedString(',')); if(aliases == null) { aliases = get(SystemPreference.ALIASES.getKey(), Interpreters.listFromDelimitedString(',')); } else { aliases.addAll(getOrDefault(SystemPreference.ALIASES.getKey(), Interpreters.listFromDelimitedString(','), ImmutableList.of())); } return MoreObjects.firstNonNull(aliases, ImmutableList.of()); } PluginConfiguration(); protected  PluginConfiguration(Path location); List<String> getAliases(); long getHeapSize(); Level getLogLevel(); boolean getRemoteDebuggerEnabled(); int getRemoteDebuggerPort();  }
@Test public void testGetAliases() { PluginConfiguration config = new StandardPluginConfiguration(Paths .get(Resources.getAbsolutePath("/alias_test.plugin.prefs"))); List<String> actual = Lists.newArrayList(); actual.add("foo"); actual.add("bar"); actual.add("car"); actual.add("dar"); actual.add("far"); List<String> expected = config.getAliases(); Assert.assertEquals(expected.containsAll(actual), actual.containsAll(expected)); }