AbstractReplacement { protected List<ReplaceEntity> getReplacementInKey(String searchQuery, String replaceString, String value, String type, String key) { if (StringUtils.isEmpty(searchQuery) || StringUtils.isEmpty(value)) { return Collections.emptyList(); } if (!this.type.equals(type)) { return Collections.emptyList(); } List<ReplaceEntity> reList = new ArrayList<ReplaceEntity>(); if (isMatch(searchQuery, replaceString, key)) { ReplaceEntity re = new ReplaceEntity(); re.setValue(value); re.setAfter(replaceString); re.setSection(getSection()); re.setKey(key); reList.add(re); } return reList; } protected  AbstractReplacement(Section section, String type); String getType(); void setType(String type); Section getSection(); void setSection(Section section); abstract List<ReplaceEntity> getReplacements(ScriptStep step, String searchQuery, String replaceString,
            SearchMode searchMode); abstract void replace(ScriptStep step, String replaceString, String key, ReplaceMode replaceMode);  }
@Test public void testGetReplacementInKey_1() throws Exception { AbstractReplacement fixture = new HostReplacement(); String searchQuery = ""; String replaceString = ""; String value = ""; String type = ""; String key = ""; List<ReplaceEntity> result = fixture.getReplacementInKey(searchQuery, replaceString, value, type, key); assertNotNull(result); assertEquals(0, result.size()); }
@Test public void testGetReplacementInKey_2() throws Exception { AbstractReplacement fixture = new HostReplacement(); String searchQuery = ""; String replaceString = ""; String value = ""; String type = ""; String key = ""; List<ReplaceEntity> result = fixture.getReplacementInKey(searchQuery, replaceString, value, type, key); assertNotNull(result); assertEquals(0, result.size()); }
@Test public void testGetReplacementInKey_3() throws Exception { AbstractReplacement fixture = new HostReplacement(); String searchQuery = ""; String replaceString = ""; String value = ""; String type = ""; String key = ""; List<ReplaceEntity> result = fixture.getReplacementInKey(searchQuery, replaceString, value, type, key); assertNotNull(result); assertEquals(0, result.size()); }
@Test public void testGetReplacementInKey_4() throws Exception { AbstractReplacement fixture = new HostReplacement(); String searchQuery = ""; String replaceString = ""; String value = ""; String type = ""; String key = ""; List<ReplaceEntity> result = fixture.getReplacementInKey(searchQuery, replaceString, value, type, key); assertNotNull(result); assertEquals(0, result.size()); }
@Test public void testGetReplacementInKey_5() throws Exception { AbstractReplacement fixture = new HostReplacement(); String searchQuery = ""; String replaceString = ""; String value = ""; String type = ""; String key = ""; List<ReplaceEntity> result = fixture.getReplacementInKey(searchQuery, replaceString, value, type, key); assertNotNull(result); assertEquals(0, result.size()); }