### Question:
ProfileAttributesResolverImpl implements ProfileAttributesResolver { public String merge(String templateString, String identifier) { return merge(templateString, identifier, null); } ProfileAttributesResolverImpl(); @PostConstruct void init(); static boolean isSkipProfileAttributesResolving(AttributedObject resource); @Override boolean containsAttribute(String str); @Override boolean isParametrizedResource(Object resource, ProfileAttributeCategory... categories); @Override @SuppressWarnings("unchecked") T mergeResource(T resource); T mergeObject(T object, String identifier); String merge(String templateString, String identifier); String merge(String templateString, String identifier, ProfileAttributeEscapeStrategy escapeStrategy); void setAttributePlaceholderPatterns(List<String> attributePlaceholderPatterns); void setProfileAttributeService(ProfileAttributeService profileAttributeService); void setMessageSource(MessageSource messageSource); void setProfileAttributeCategories(List<ProfileAttributeCategory> profileAttributeCategories); void setExcludedResourcesFromAttrResolving(Set<String> excludedResourcesFromAttrResolving); void setEnabledResolving(boolean enabledResolving); void setParametrizedResourcePatterns(List<String> parametrizedResourcePatterns); void setValidator(Validator validator); static final String attributeNameGroup; static final String categoryGroup; static final String groupExpression; static final String PROFILE_ATTRIBUTE_EXCEPTION_SUBSTITUTION_BASE; static final String IN_RESOURCE_SUFFIX; }### Answer:
@Test public void merge_multilineTest_passed() { String template = "before text: %1$s, after text\n" + "newline before text: %2$s, newline after text %2$s\r\n" + "newline1 before text: %3$s, newline3 after text %3$s\r" + "newline2: %1$s, after..."; String parameterized = String.format( template, "{attribute('userName', 'User')}", "{attribute(''connectionUrl'', ''Tenant'')}", "{attribute('driverClass')}" ); String expected = String.format( template, jdbcUserName, jdbcConnectionUrl, jdbcDriverClass ); String result = profileAttributesResolverImpl.merge(parameterized, "template text"); assertEquals(expected, result); }