### Question:
PathCreator { private static String replace(final String path, final String type, final long replacement, final int pad) { String value = String.valueOf(replacement); if (pad > 0) { value = StringUtils.leftPad(value, pad, '0'); } return replace(path, type, value); }    }### Answer:
@Test public void testReplace() { final String template = "someText_${type1}_someText_${feed}_someText_${type2}_someText"; final String result = PathCreator.replaceAll(template, metaMap); LOGGER.info("result: %s", result); Assert.assertEquals("someText_mytype1_someText_myFeed_someText_mytype2_someText", result); }