AbstractConfiguration implements Configuration { protected String[] getFragments(final String qualifiedName) { final String[] splits = qualifiedName.split("\\."); for (final String split : splits) { if (split.isEmpty()) { assertFalse(true, "Value must not empty"); } } return splits; } AbstractConfiguration();  AbstractConfiguration(final boolean readOnly); Configuration getSubconfiguration(String key); Object get(final String key); @Override String getAsString(final String key, final String defaultValue); @Override boolean getAsBoolean(final String key, final boolean defaultValue); @Override int getAsInt(final String key, final int defaultValue); @Override long getAsLong(final String key, final long defaultValue); @Override double getAsDouble(final String key, final double defaultValue); @Override List<String> getAsList(final String key);  }
@Test public void testGetFragments() { final String[] fragments = configuration.getFragments(input); assertArrayEquals(expected, fragments); }
@Test(expected = Error.class) public void shouldThrowException() { configuration.getFragments(".test"); }