verify(tested);
assertEquals("Expected and actual did not match", expected, actual);
}
public void testMultiMock() throws Exception {
PrivateFinal tested1 = createPartialMock(PrivateFinal.class, "sayIt");
String expected1 = "Hello altered World";
expectPrivate(tested1, "sayIt", "name").andReturn(expected1);
replay(tested1);
PrivateFinal tested2 = createPartialMock(PrivateFinal.class, "sayIt");
String expected2 = "Hello qweqweqwe";
expectPrivate(tested2, "sayIt", "name").andReturn(expected2);
replay(tested2);
String actual1 = tested1.say("name");
verify(tested1);
assertEquals("Expected and actual did not match", expected1, actual1);
String actual2 = tested2.say("name");
verify(tested2);
assertEquals("Expected and actual did not match", expected2, actual2);
}