title: Junit test case for PreparedStatementCallback coverage
body: <pre><code>@Transactional
      public Boolean save(final StudentLogEntry studentLogEntry) throws SQLException,DaoException{
          boolean returnFlag = true;
          String sqlInsert = "insert into STUDENT_DETAILS (INSERT_DATE,STUDENT_NAME,STUDENT_ID) values(SYSDATE,?,?)";
          returnFlag = jdbcTemplate.execute(
              sqlInsert,
              new PreparedStatementCallback&lt;Boolean&gt;() {
                  Boolean b=false;
                  @Override
                  public Boolean doInPreparedStatement(PreparedStatement pst) {
                      try {
                          pst.setString(2, studentLogEntry.getStuName());
                          pst.setString(3, studentLogEntry.getStuId());
                          b=pst.execute();
                      } catch (SQLException e) {
                          clicklogger.info("SQLException has occurred while inserting studentlog ",e);
                      } catch (DataAccessException e) {
                          clicklogger.info("DataAccessException has occurred while inserting studentlog ",e);
                      }
                      return b;
                  }
              }
          );
          return returnFlag;
      }
  </code></pre>
  
  <p>I am using Spring framework for my project, I have written Junit test case for the above code. But I am not able to cover the <code>PreparedStatementCallback</code>. My test case is as below:</p>
  
  <pre><code>@Test
  public void testSave() throws DaoException, SQLException {
      studentDao.setJdbcTemplate(jdbcTemplate);
      studentDao.setTransactionManager(transactionManager);
      StudentLogEntry studentLogEntry = new StudentLogEntry();
      studentLogEntry.getStuName("ABC");
      studentLogEntry.getStuId("1234");
      assertEquals("true",studentDao.save(studentLogEntry));
  }
  </code></pre>