@Test public void testSuppressMethod() throws Exception { suppress(method(ExampleWithEvilMethod.class, "getEvilMessage")); final String message = "myMessage"; ExampleWithEvilMethod tested = new ExampleWithEvilMethod(message); assertEquals(message + "null", tested.getMessage()); }
public String getMessage() { return message + getEvilMessage(); }
ExampleWithEvilMethod { public String getMessage() { return message + getEvilMessage(); } }
ExampleWithEvilMethod { public String getMessage() { return message + getEvilMessage(); } ExampleWithEvilMethod(String message); }
ExampleWithEvilMethod { public String getMessage() { return message + getEvilMessage(); } ExampleWithEvilMethod(String message); String getMessage(); }
ExampleWithEvilMethod { public String getMessage() { return message + getEvilMessage(); } ExampleWithEvilMethod(String message); String getMessage();  }