}
@Test
public void applyTableItemProviderColor() {
Object item = mock(Object.class);
ITableItemColorProvider itemProvider = mock(ITableItemColorProvider.class);
when(itemProvider.getForeground(item, COLUMN_INDEX)).thenReturn(foregroundObject);
when(itemProvider.getBackground(item, COLUMN_INDEX)).thenReturn(backgroundObject);
when(adapterFactory.adapt(item, ITableItemColorProvider.class)).thenReturn(itemProvider);
Cell cell = new Cell();
cellFactory.applyTableItemProviderColor(item, COLUMN_INDEX, cell, adapterFactory);
assertEquals(foregroundColor, cell.getTextFill());
assertEquals("-fx-background-color: rgb(0, 255, 0)", cell.getStyle());