ColumnImpl implements Column { @Override public void setEstimator(Estimator estimator) { if (!dynamic) { throw new IllegalStateException("The column must have a dynamic type"); } if (TimeMap.class.isAssignableFrom(typeClass)) { TimeMap vs = null; try { vs = (TimeMap) typeClass.newInstance(); } catch (InstantiationException ex) { throw new RuntimeException(ex); } catch (IllegalAccessException ex) { throw new RuntimeException(ex); } if (!vs.isSupported(estimator)) { throw new IllegalArgumentException("The column doesnt't support this estimator"); } this.estimator = estimator; } } ColumnImpl(TableImpl table, String id, Class typeClass, String title, Object defaultValue, Origin origin, boolean indexed, boolean readOnly);  ColumnImpl(String id, Class typeClass, String title, Object defaultValue, Origin origin, boolean indexed, boolean readOnly); @Override String getId(); @Override int getIndex(); @Override Class getTypeClass(); @Override String getTitle(); @Override Object getDefaultValue(); @Override Origin getOrigin(); @Override Table getTable(); @Override boolean isIndexed(); @Override boolean isArray(); @Override boolean isDynamic(); @Override boolean isReadOnly(); @Override boolean isNumber(); @Override boolean isProperty(); int getStoreId(); void setStoreId(int storeId); @Override String toString(); @Override Estimator getEstimator(); @Override void setEstimator(Estimator estimator); @Override ColumnObserverImpl createColumnObserver(boolean withDiff); @Override boolean equals(Object obj); @Override int hashCode(); int deepHashCode(); boolean deepEquals(ColumnImpl col);  }
@Test(expectedExceptions = IllegalStateException.class) public void testColumnSetEstimatorStatic() { ColumnImpl col = new ColumnImpl("0", String.class, null, null, Origin.DATA, false, false); col.setEstimator(Estimator.AVERAGE); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testColumnSetEstimatorNotSupported() { ColumnImpl col = new ColumnImpl("0", TimestampStringMap.class, null, null, Origin.DATA, false, false); col.setEstimator(Estimator.AVERAGE); }