@Test public void testComposingUniqueNodeNameWhenItContainsNotIndexedSuffix() { assertThat(dmnDeepCloneProcess.composeUniqueNodeName(INPUT_DATA_NAME + "-A3")) .isEqualTo(INPUT_DATA_NAME + "-A3" + FIRST_INDEX_IN_SUFFIX); }
protected String composeUniqueNodeName(final String name) { final String originalName = Optional.ofNullable(name).orElse(""); final MatchResult nameSuffixMatcher = NAME_SUFFIX_REGEX.exec(originalName); if (nameSuffixMatcher != null) { return buildNameWithIncrementedSuffixIndex(originalName, nameSuffixMatcher); } return joinPrefixWithIndexedSuffix(originalName); }
DMNDeepCloneProcess extends DeepCloneProcess implements IDeepCloneProcess { protected String composeUniqueNodeName(final String name) { final String originalName = Optional.ofNullable(name).orElse(""); final MatchResult nameSuffixMatcher = NAME_SUFFIX_REGEX.exec(originalName); if (nameSuffixMatcher != null) { return buildNameWithIncrementedSuffixIndex(originalName, nameSuffixMatcher); } return joinPrefixWithIndexedSuffix(originalName); } }
DMNDeepCloneProcess extends DeepCloneProcess implements IDeepCloneProcess { protected String composeUniqueNodeName(final String name) { final String originalName = Optional.ofNullable(name).orElse(""); final MatchResult nameSuffixMatcher = NAME_SUFFIX_REGEX.exec(originalName); if (nameSuffixMatcher != null) { return buildNameWithIncrementedSuffixIndex(originalName, nameSuffixMatcher); } return joinPrefixWithIndexedSuffix(originalName); } protected  DMNDeepCloneProcess(); @Inject  DMNDeepCloneProcess(final FactoryManager factoryManager,
                               final AdapterManager adapterManager,
                               final ClassUtils classUtils,
                               final SessionManager sessionManager); }
DMNDeepCloneProcess extends DeepCloneProcess implements IDeepCloneProcess { protected String composeUniqueNodeName(final String name) { final String originalName = Optional.ofNullable(name).orElse(""); final MatchResult nameSuffixMatcher = NAME_SUFFIX_REGEX.exec(originalName); if (nameSuffixMatcher != null) { return buildNameWithIncrementedSuffixIndex(originalName, nameSuffixMatcher); } return joinPrefixWithIndexedSuffix(originalName); } protected  DMNDeepCloneProcess(); @Inject  DMNDeepCloneProcess(final FactoryManager factoryManager,
                               final AdapterManager adapterManager,
                               final ClassUtils classUtils,
                               final SessionManager sessionManager); @Override T clone(final S source,
                          final T target); }
DMNDeepCloneProcess extends DeepCloneProcess implements IDeepCloneProcess { protected String composeUniqueNodeName(final String name) { final String originalName = Optional.ofNullable(name).orElse(""); final MatchResult nameSuffixMatcher = NAME_SUFFIX_REGEX.exec(originalName); if (nameSuffixMatcher != null) { return buildNameWithIncrementedSuffixIndex(originalName, nameSuffixMatcher); } return joinPrefixWithIndexedSuffix(originalName); } protected  DMNDeepCloneProcess(); @Inject  DMNDeepCloneProcess(final FactoryManager factoryManager,
                               final AdapterManager adapterManager,
                               final ClassUtils classUtils,
                               final SessionManager sessionManager); @Override T clone(final S source,
                          final T target);  }