@Test
public void testStaticAndInstanceWithConstructor() throws Exception {
StaticAndInstanceDemo staticAndInstanceDemoMock = createMock(StaticAndInstanceDemo.class);
StaticAndInstanceWithConstructorCodeDemo tested = new StaticAndInstanceWithConstructorCodeDemo(
staticAndInstanceDemoMock);
niceReplayAndVerify();
mockStaticPartial(StaticAndInstanceDemo.class, "getStaticMessage");
final String instanceExpected = "value";
expect(staticAndInstanceDemoMock.getMessage()).andReturn(
instanceExpected);
final String staticExpected = "a static message";
expect(StaticAndInstanceDemo.getStaticMessage()).andReturn(
staticExpected);
replay(StaticAndInstanceDemo.class, staticAndInstanceDemoMock, tested);
String actual = tested.getMessage();
verify(StaticAndInstanceDemo.class, staticAndInstanceDemoMock, tested);
assertEquals(staticExpected + instanceExpected, actual);
}