@Test public void testGenerateApplicationnumbers() { when(jdbcTemplate.queryForObject(Matchers.any(String.class), Matchers.<Class<String>>any())) .thenReturn("00015"); String applicationNumber = marriageRegnRepository.generateApplicationNumber(); assertEquals("00015", applicationNumber); }
public String generateApplicationNumber() { String applicationnumber = jdbcTemplate .queryForObject("SELECT nextval('seq_egmr_marriageregn_application_number')", String.class); System.out.println("applicationnumber-------------------->" + applicationnumber); return applicationnumber; }
MarriageRegnRepository { public String generateApplicationNumber() { String applicationnumber = jdbcTemplate .queryForObject("SELECT nextval('seq_egmr_marriageregn_application_number')", String.class); System.out.println("applicationnumber-------------------->" + applicationnumber); return applicationnumber; } }
MarriageRegnRepository { public String generateApplicationNumber() { String applicationnumber = jdbcTemplate .queryForObject("SELECT nextval('seq_egmr_marriageregn_application_number')", String.class); System.out.println("applicationnumber-------------------->" + applicationnumber); return applicationnumber; }  }
MarriageRegnRepository { public String generateApplicationNumber() { String applicationnumber = jdbcTemplate .queryForObject("SELECT nextval('seq_egmr_marriageregn_application_number')", String.class); System.out.println("applicationnumber-------------------->" + applicationnumber); return applicationnumber; }  @SuppressWarnings("unchecked") List<MarriageRegn> findForCriteria(MarriageRegnCriteria marriageRegnCriteria); void save(MarriageRegn marriageRegn); String generateApplicationNumber(); void update(MarriageRegn marriageRegn); void saveJson(String applicationNumber, String marriageRegnJson, String tenantId); }
MarriageRegnRepository { public String generateApplicationNumber() { String applicationnumber = jdbcTemplate .queryForObject("SELECT nextval('seq_egmr_marriageregn_application_number')", String.class); System.out.println("applicationnumber-------------------->" + applicationnumber); return applicationnumber; }  @SuppressWarnings("unchecked") List<MarriageRegn> findForCriteria(MarriageRegnCriteria marriageRegnCriteria); void save(MarriageRegn marriageRegn); String generateApplicationNumber(); void update(MarriageRegn marriageRegn); void saveJson(String applicationNumber, String marriageRegnJson, String tenantId); static final String INSERT_JSON_QUERY; static final String INSERT_MARRIAGE_REGN_QUERY; static final String UPDATE_MARRIAGE_REGN_QUERY; }