### Question:
FunctionSignatureParser { String cleanUpSignatureText(String text, FunctionSignature signature) { DataType returnType = signature.getReturnType(); text = replaceDataTypeIfNeeded(text, returnType, REPLACEMENT_DT_NAME); text = replaceNameIfNeeded(text, signature.getName(), REPLACE_NAME); ParameterDefinition[] arguments = signature.getArguments(); for (ParameterDefinition argument : arguments) { text = replaceDataTypeIfNeeded(text, argument.getDataType(), REPLACEMENT_DT_NAME + argument.getOrdinal()); text = replaceNameIfNeeded(text, argument.getName(), REPLACE_NAME + argument.getOrdinal()); } return text; } FunctionSignatureParser(Program program, DataTypeManagerService service); FunctionDefinitionDataType parse(FunctionSignature originalSignature,
			String signatureText);  }### Answer:
@Test public void testCleanUpSignatureTextWithFunkyReturnType() { FunctionSignature f = fun("abc(d", "Bob", "int", "a"); String result = parser.cleanUpSignatureText("abc(d Bob(int a)", f); assertEquals("__REPLACE_DT_NAME__ Bob(int a)", result); }
@Test public void testCleanUpSignatureTextWithFunkyFunctionName() { FunctionSignature f = fun("int", "<Bob,Joe>", "int", "a"); String result = parser.cleanUpSignatureText("int <Bob,Joe>(int a)", f); assertEquals("int __REPLACE_NAME__(int a)", result); }
@Test public void testCleanUpSignatureTextWithFunkyParamName() { FunctionSignature f = fun("int", "Bob", "int", "{,a>"); String result = parser.cleanUpSignatureText("int Bob(int {,a>)", f); assertEquals("int Bob(int __REPLACE_NAME__0)", result); }
@Test public void testCleanUpSignatureTextWithFunkyParamDatatype() { FunctionSignature f = fun("int", "Bob", "(aaa)", "a"); String result = parser.cleanUpSignatureText("int Bob((aaa) a)", f); assertEquals("int Bob(__REPLACE_DT_NAME__0 a)", result); }