### Question:
AbstractOutputBuilder { public static String replacePlaceHolder(String message, PlaceholderMap placeholderStringMap) { if (StringUtils.isBlank(message)) { throw new SakuliRuntimeException("Template for resolving test suite output is EMPTY!"); } String modifiedString = message; for (TextPlaceholder key : placeholderStringMap.keySet()) { modifiedString = StringUtils.replace(modifiedString, key.getPattern(), placeholderStringMap.get(key)); } for (TextPlaceholder placeholder : placeholderStringMap.keySet()) { if (StringUtils.contains(modifiedString, placeholder.getPattern())) { return replacePlaceHolder(modifiedString, placeholderStringMap); } } return modifiedString; }  static String replacePlaceHolder(String message, PlaceholderMap placeholderStringMap); final static SimpleDateFormat dateFormat; }### Answer:
@Test(dataProvider = "placeholder") public void testReplacePlaceHolder(String testMessage, String expectedMesaage) throws Exception { PlaceholderMap map = new PlaceholderMap(); map.put(STATE, "OK"); map.put(ID, "sakuli-123"); assertEquals(AbstractOutputBuilder.replacePlaceHolder(testMessage, map), expectedMesaage); map.put(STATE, STATE_DESC.getPattern()); map.put(STATE_DESC, "OK"); assertEquals(AbstractOutputBuilder.replacePlaceHolder(testMessage, map), expectedMesaage); }
@Test(expectedExceptions = SakuliRuntimeException.class) public void testPlaceholderNull() throws Exception { AbstractOutputBuilder.replacePlaceHolder(null, null); }