DefaultTableColumnVisibilityModel implements TableColumnVisibilityModel { @Override public Boolean isColumnHidden(final String tableUniqueIdentifier, final String columnUniqueIdentifier) { if (visibility == null || !visibility.getTableIdentifier().equalsIgnoreCase(tableUniqueIdentifier) || (!visibility.getInvisibleColumns().contains(columnUniqueIdentifier) && !visibility.getVisibleColumns().contains(columnUniqueIdentifier))) { return null; } return visibility.getInvisibleColumns().contains(columnUniqueIdentifier); }  @Override void update(final TableColumnVisibility visibility); @Override Boolean isColumnHidden(final String tableUniqueIdentifier, final String columnUniqueIdentifier);  }
@Test void testIsColumnHidden() { final DefaultTableColumnVisibilityModel model = new DefaultTableColumnVisibilityModel(); assertThat(model.isColumnHidden("dtoIsNull", "dtoIsNull")).isNull(); model.update(new TableColumnVisibility("tableIdentifier", Arrays.asList("visible1", "visible2"), Arrays.asList("invisible1", "invisible2"))); assertThat(model.isColumnHidden("tableIdentifierIsNotMatching", "visible1")).isNull(); assertThat(model.isColumnHidden("tableIdentifier", "columnIdentifierIsNotMatching")).isNull(); assertThat(model.isColumnHidden("tableIdentifier", "visible1")).isFalse(); assertThat(model.isColumnHidden("tableIdentifier", "visible2")).isFalse(); assertThat(model.isColumnHidden("tableIdentifier", "invisible1")).isTrue(); assertThat(model.isColumnHidden("tableIdentifier", "invisible2")).isTrue(); }