public void testMatchReturnType2() {
MethodPattern methodPattern = Pattern.compileMethodPattern("String method()");
assertFalse(methodPattern.matchReturnType("int"));
assertTrue(methodPattern.matchReturnType("java.lang.String"));
assertFalse(methodPattern.matchReturnType("String"));
assertFalse(methodPattern.matchReturnType(""));
}
public void testMatchReturnType3() {
MethodPattern methodPattern = Pattern.compileMethodPattern("java.lang.String method()");