public class NoAnnotationUsageTest extends TestCase {
public void testGetMessage() throws Exception {
mockStaticPartial(StaticAndInstanceDemo.class, "getStaticMessage");
StaticAndInstanceDemo tested = createPartialMock(StaticAndInstanceDemo.class, "getPrivateMessage");
final String staticExpected = "a static message";
expect(StaticAndInstanceDemo.getStaticMessage()).andReturn(staticExpected);
final String privateExpected = "A private message ";
expectPrivate(tested, "getPrivateMessage").andReturn(privateExpected);
replay(tested);
replay(StaticAndInstanceDemo.class);
String actual = tested.getMessage();
verify(tested);
verify(StaticAndInstanceDemo.class);
assertEquals(privateExpected + staticExpected, actual);