SomeDelayedClient implements Client { @Override public String getValueFromTheInternet(String id) { sleepFiveSecondsIfUserIsYo(id); return "delayed=" + inner.getValueFromTheInternet(id); }  @Override String getValueFromTheInternet(String id);  }
@Test public void overriddenMethodShouldHaveDifferentPrefix() throws Exception { assertThat(cut.getValueFromTheInternet("yo")).startsWith("delayed"); }
@Test public void withMocks() throws Exception { expect(mock.getValueFromTheInternet("yo")).andReturn("mama"); replay(mock); assertThat(cut.getValueFromTheInternet("yo")).isEqualTo("delayed=mama"); verify(mock); }