ConfigCenterNode { public String getSchemaName(final String configurationNodeFullPath) { Pattern pattern = Pattern.compile(getSchemasPath() + "/(\\w+)" + "(/datasource|/rule)?", Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(configurationNodeFullPath); return matcher.find() ? matcher.group(1) : ""; }  String getSchemasPath(); String getSchemaNamePath(final String schemaName); String getDataSourcePath(final String schemaName); String getRulePath(final String schemaName); String getTablePath(final String schemaName); String getAuthenticationPath(); String getPropsPath(); String getSchemaName(final String configurationNodeFullPath); Collection<String> splitSchemaName(final String schemaNames); Collection<String> getAllSchemaConfigPaths(final Collection<String> schemaNames);  }
@Test public void assertGetSchemaName() { assertThat(configurationNode.getSchemaName("/schemas/logic_db/rule"), is(DefaultSchema.LOGIC_NAME)); }