@Test
public void testColumnErrors() throws Exception {
LensException e;
e = getLensExceptionInRewrite("select msr11 + msr2 from basecube" + " where " + TWO_DAYS_RANGE, conf);
e.buildLensErrorResponse(new ErrorCollectionFactory().createErrorCollection(), null, "testid");
assertEquals(e.getErrorCode(),
LensCubeErrorCode.NO_FACT_HAS_COLUMN.getLensErrorInfo().getErrorCode());
assertTrue(e.getMessage().contains("msr11"), e.getMessage());
assertTrue(e.getMessage().contains("msr2"), e.getMessage());
e = getLensExceptionInRewrite("select dim1, test_time_dim, msr3, msr13 from basecube where "
+ TWO_DAYS_RANGE, conf);
assertEquals(e.getErrorCode(),
LensCubeErrorCode.NO_JOIN_CANDIDATE_AVAILABLE.getLensErrorInfo().getErrorCode());
assertTrue(e.getMessage().contains("[msr3, msr13]"));
}