TextValue implements CellValue { @Override public void setToCell(final TableCell tableCell) { tableCell.setText(this.text); } TextValue(final Text text); @Override boolean equals(final Object o); @Override final int hashCode(); @Override void setToCell(final TableCell tableCell);  }
@Test public void testSet() { PowerMock.resetAll(); final TableCell cell = PowerMock.createMock(TableCell.class); final Capture<Text> capturedValue = Capture.newInstance(); cell.setText(EasyMock.capture(capturedValue)); PowerMock.replayAll(); final Text text = Text.content("text"); final CellValue cv = new TextValue(text); cv.setToCell(cell); Assert.assertEquals(text, capturedValue.getValue()); PowerMock.verifyAll(); }