@PrepareForTest(MockSelfPrivateFieldServiceClass.class)
public class MockSelfPrivateFieldServiceClassTest {
@Test
public void testGetCompositeMessage() throws Exception {
MockSelfPrivateFieldServiceClass tested = createPartialMock(MockSelfPrivateFieldServiceClass.class, "getOwnMessage");
Service serviceMock = createMock(Service.class);
setInternalState(tested, "service", serviceMock, MockSelfPrivateFieldServiceClass.class);
final String expected = "Hello world";
expectPrivate(tested, "getOwnMessage").andReturn("Hello");
expect(serviceMock.getServiceMessage()).andReturn(" world");
replay(serviceMock);
replay(tested);
final String actual = tested.getCompositeMessage();
verify(serviceMock);
verify(tested);
assertEquals(expected, actual);