title: Spring jdbcTemplate unit testing
body: <p>I am new to Spring and only somewhat experienced  with JUnit and Mockito</p>
  
  <p>I have the following method which requires a unit test</p>
  
  <pre><code>public static String getUserNames(final String userName {
    List&lt;String&gt; results = new LinkedList&lt;String&gt;();
     results =  service.getJdbcTemplate().query("SELECT USERNAME FROM USERNAMES WHERE NAME = ?", new RowMapper&lt;String&gt;() {
        @Override
        public String mapRow(ResultSet rs, int rowNum) throws SQLException {
            return new String(rs.getString("USERNAME");
        }
     }
  
     return results.get(0);      
     },userName)
  </code></pre>
  
  <p>Does anyone have any suggestions on how I might achieve this using JUnit and Mockito? </p>
  
  <p>Thank you very much in advance! </p>