@Test public void testReplaceData() throws Exception { final String modifyDataMethodName = "modifyData"; final byte[] expectedBinaryData = new byte[] { 42 }; final String expectedDataId = "id"; DataService tested = createPartialMock(DataService.class, modifyDataMethodName); expectPrivate(tested, modifyDataMethodName, expectedDataId, expectedBinaryData).andReturn(true); replay(tested); assertTrue(tested.replaceData(expectedDataId, expectedBinaryData)); verify(tested); }
public boolean replaceData(final String dataId, final byte[] binaryData) { return modifyData(dataId, binaryData); }
DataService { public boolean replaceData(final String dataId, final byte[] binaryData) { return modifyData(dataId, binaryData); } }
DataService { public boolean replaceData(final String dataId, final byte[] binaryData) { return modifyData(dataId, binaryData); }  }
DataService { public boolean replaceData(final String dataId, final byte[] binaryData) { return modifyData(dataId, binaryData); }  boolean replaceData(final String dataId, final byte[] binaryData); boolean deleteData(final String dataId); }
DataService { public boolean replaceData(final String dataId, final byte[] binaryData) { return modifyData(dataId, binaryData); }  boolean replaceData(final String dataId, final byte[] binaryData); boolean deleteData(final String dataId);  }