@Test
  public void testGetIntColumnValues() throws Exception {
    DBAccessorImpl dbAccessor = injector.getInstance(DBAccessorImpl.class);
    String sourceTableName = getFreeTableName();
    int testRowAmount = 10;

    createMyTable(sourceTableName, "col1", "col2", "col3", "col4", "col5");

    for (Integer i = 0; i < testRowAmount; i++) {
      dbAccessor.insertRow(sourceTableName,
          new String[]{"id", "col1", "col2", "col3", "col4", "col5"},
          new String[]{i.toString(), String.format("'1,%s'", i), String.format("'2,%s'", i * 2), String.format("'3,%s'", i * 3), String.format("'4,%s'", i * 4), String.format("'%s'", (i * 5) % 2)}, false);
    }

    List<Integer> idList = dbAccessor.getIntColumnValues(sourceTableName, "id",
        new String[]{"col1", "col5"}, new String[]{"1,0", "0"}, false);

    assertEquals(idList.size(), 1);
    assertEquals(idList.get(0), Integer.valueOf(0));

    idList = dbAccessor.getIntColumnValues(sourceTableName, "id",
        new String[]{"col5"}, new String[]{"0"}, false);

    assertEquals(idList.size(), 5);

    int i = 0;
    for (Integer id : idList) {
      assertEquals(id, Integer.valueOf(i * 2));
      i++;
    }

  }
Checks to ensure that columns created with a default have the correct
DEFAULT constraint value set in.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/orm/DBAccessorImplTest.java