@Test public void testExtractRunModeSpecFromName() { Assert.assertThat(ConfigFilesRetrieverImpl .extractRunModeSpecFromName(""), Matchers.equalTo("")); Assert.assertThat(ConfigFilesRetrieverImpl .extractRunModeSpecFromName("namewithoutrunmodes"), Matchers.equalTo("")); Assert.assertThat(ConfigFilesRetrieverImpl .extractRunModeSpecFromName("name.runmode1"), Matchers.equalTo("runmode1")); Assert.assertThat(ConfigFilesRetrieverImpl .extractRunModeSpecFromName("name.runmode1.runmode2"), Matchers.equalTo("runmode1.runmode2")); Assert.assertThat(ConfigFilesRetrieverImpl .extractRunModeSpecFromName("namewithoutrunmodes."), Matchers.equalTo("")); }
static String extractRunModeSpecFromName(final String name) { int positionDot = name.indexOf("."); if (positionDot == -1) { return ""; } return name.substring(positionDot + 1); }
ConfigFilesRetrieverImpl implements ConfigFilesRetriever { static String extractRunModeSpecFromName(final String name) { int positionDot = name.indexOf("."); if (positionDot == -1) { return ""; } return name.substring(positionDot + 1); } }
ConfigFilesRetrieverImpl implements ConfigFilesRetriever { static String extractRunModeSpecFromName(final String name) { int positionDot = name.indexOf("."); if (positionDot == -1) { return ""; } return name.substring(positionDot + 1); }  }
ConfigFilesRetrieverImpl implements ConfigFilesRetriever { static String extractRunModeSpecFromName(final String name) { int positionDot = name.indexOf("."); if (positionDot == -1) { return ""; } return name.substring(positionDot + 1); }  @Override Map<String, String> getConfigFileContentFromNode(String rootPath, Session session); @Override Map<String, String> getConfigFileContentFromPackage(Archive archive); }
ConfigFilesRetrieverImpl implements ConfigFilesRetriever { static String extractRunModeSpecFromName(final String name) { int positionDot = name.indexOf("."); if (positionDot == -1) { return ""; } return name.substring(positionDot + 1); }  @Override Map<String, String> getConfigFileContentFromNode(String rootPath, Session session); @Override Map<String, String> getConfigFileContentFromPackage(Archive archive);  }