@Test
public void createHeuristicResult() throws SQLException {

    String appId = "appId";
    String detail = "detail";
    HeuristicsResultDB db = new HeuristicsResultDB(dbConfiguration);
    HeuristicResult heuristicResult = new HeuristicResult(appId, "attemptId", GCCause.class, 1, 1);
    heuristicResult.addDetail(detail, "value", "This is a new detail");
    db.createHeuristicResult(heuristicResult);
    ResultSet rset = db.connection.createStatement().executeQuery("SELECT  * FROM garmadon_yarn_app_heuristic_result");
    HashMap<String, String> result = new HashMap<>();
    while (rset.next()) {
        result.put(rset.getString(1), rset.getString(2));
    }
    assertEquals(appId, result.get("1"));
    rset = db.connection.createStatement().executeQuery("SELECT  * FROM garmadon_yarn_app_heuristic_result_details");
    result = new HashMap<>();
    while (rset.next()) {
        result.put(rset.getString(1), rset.getString(2));
    }
    assertEquals(detail, result.get("1"));
}