@Test public void test() throws Exception { when(rs.next()).thenReturn(true).thenReturn(false); when(rs.getObject("mr_applicationNumber")).thenReturn("00015"); when(rs.getLong("mr_marriagedate")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mr_venue")).thenReturn(Venue.FUNCTION_HALL.toString()); when(rs.getString("mr_street")).thenReturn("Belandur"); when(rs.getString("mr_locality")).thenReturn("Belandur"); when(rs.getString("mr_placeofmarriage")).thenReturn(Venue.FUNCTION_HALL.toString()); when(rs.getString("mr_city")).thenReturn("Bangalore"); when(rs.getString("mr_marriagePhoto")).thenReturn("NoPhoto"); when(rs.getObject("mr_fee")).thenReturn(getFee()); when(rs.getString("mr_serialNo")).thenReturn("00015"); when(rs.getString("mr_volumeNo")).thenReturn("2"); when(rs.getString("mr_applicationNumber")).thenReturn("00015"); when(rs.getString("mr_status")).thenReturn("ACTIVE"); when(rs.getString("mr_source")).thenReturn("source"); when(rs.getString("mr_stateId")).thenReturn("XSD123"); when(rs.getBoolean("mr_isactive")).thenReturn(true); when(rs.getString("mr_tenantid")).thenReturn("ap.kurnool"); when(rs.getString("mr_createdby")).thenReturn("6"); when(rs.getLong("mr_createdtime")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mr_lastmodifiedby")).thenReturn("6"); when(rs.getLong("mr_lastmodifiedtime")).thenReturn(Long.valueOf("9874563210")); when(rs.getLong("ru_block")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("ru_doorno")).thenReturn("10"); when(rs.getLong("ru_electionward")).thenReturn(Long.valueOf("9874563210")); when(rs.getLong("ru_locality")).thenReturn(Long.valueOf("9874563210")); when(rs.getInt("ru_pincode")).thenReturn(Integer.valueOf(98745621)); when(rs.getLong("ru_revenueward")).thenReturn(Long.valueOf("9874563210")); when(rs.getLong("ru_street")).thenReturn(Long.valueOf("9874563210")); when(rs.getLong("ru_zone")).thenReturn(Long.valueOf("9874563210")); when(rs.getLong("ru_id")).thenReturn(Long.valueOf("2")); when(rs.getBoolean("ru_isactive")).thenReturn(true); when(rs.getString("ru_name")).thenReturn("Bangalore"); when(rs.getString("ru_tenantid")).thenReturn("ap.kurnool"); when(rs.getString("ru_code")).thenReturn("00015"); when(rs.getLong("mpbg_id")).thenReturn(Long.valueOf("6")); when(rs.getString("mpbg_name")).thenReturn("brideGroomName"); when(rs.getString("mpbg_parentname")).thenReturn("bgParentName"); when(rs.getString("mpbg_street")).thenReturn("belandur"); when(rs.getString("mpbg_locality")).thenReturn("belandur"); when(rs.getString("mpbg_city")).thenReturn("Bangalore"); when(rs.getString("mpbg_status")).thenReturn("ACTIVE"); when(rs.getString("mpbg_aadhaar")).thenReturn("XCV12NBV"); when(rs.getString("mpbg_mobileno")).thenReturn("9517563268"); when(rs.getString("mpbg_email")).thenReturn("abc@gmail.com"); when(rs.getLong("mpbg_religion")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mpbg_religionpractice")).thenReturn("Hindu"); when(rs.getString("mpbg_education")).thenReturn("BE"); when(rs.getString("mpbg_occupation")).thenReturn("driver"); when(rs.getLong("mpbg_dob")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mpbg_handicapped")).thenReturn("NotHandicapped"); when(rs.getString("mpbg_residenceaddress")).thenReturn("Bangalore"); when(rs.getString("mpbg_photo")).thenReturn("NoPhoto"); when(rs.getString("mpbg_nationality")).thenReturn("Indian"); when(rs.getLong("mpb_id")).thenReturn(Long.valueOf("6")); when(rs.getString("mpb_name")).thenReturn("brideName"); when(rs.getString("mpb_parentname")).thenReturn("bParentName"); when(rs.getString("mpb_street")).thenReturn("belandur"); when(rs.getString("mpb_locality")).thenReturn("belandur"); when(rs.getString("mpb_city")).thenReturn("Bangalore"); when(rs.getString("mpb_status")).thenReturn("ACTIVE"); when(rs.getString("mpb_aadhaar")).thenReturn("XCV12NBV"); when(rs.getString("mpb_mobileno")).thenReturn("9517563268"); when(rs.getString("mpb_email")).thenReturn("abc@gmail.com"); when(rs.getLong("mpb_religion")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mpb_religionpractice")).thenReturn("Hindu"); when(rs.getString("mpb_education")).thenReturn("BE"); when(rs.getString("mpb_occupation")).thenReturn("driver"); when(rs.getLong("mpb_dob")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mpb_handicapped")).thenReturn("NotHandicapped"); when(rs.getString("mpb_residenceaddress")).thenReturn("Bangalore"); when(rs.getString("mpb_photo")).thenReturn("NoPhoto"); when(rs.getString("mpb_nationality")).thenReturn("Indian"); when(rs.getString("mr_priestname")).thenReturn("Acharya"); when(rs.getLong("mr_priestreligion")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mr_priestaddress")).thenReturn("Belandur"); when(rs.getString("mr_priestaadhaar")).thenReturn("XCV51NBV"); when(rs.getString("mr_priestmobileno")).thenReturn("9874563210"); when(rs.getString("mr_priestemail")).thenReturn("abc@gmail.com"); when(rs.getString("mr_approvalaction")).thenReturn("APPROVED"); when(rs.getLong("mr_approvalassignee")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mr_approvalcomments")).thenReturn("NoComments"); when(rs.getLong("mr_approvaldepartment")).thenReturn(Long.valueOf("9874563210")); when(rs.getLong("mr_approvaldesignation")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mr_approvalstatus")).thenReturn("ACTIVE"); when(rs.getInt("w_witnessno")).thenReturn(Integer.valueOf(98745632)); when(rs.getString("w_name")).thenReturn("Witnesser"); when(rs.getString("w_aadhaar")).thenReturn("XCV15NBV"); when(rs.getString("w_address")).thenReturn("BAngalore"); when(rs.getInt("w_age")).thenReturn(Integer.valueOf(98745632)); when(rs.getString("w_occupation")).thenReturn("Witnessing"); when(rs.getString("w_relation")).thenReturn("Relative"); when(rs.getString("w_relatedto")).thenReturn(RelatedTo.BRIDEGROOM.toString()); when(rs.getString("w_relationship")).thenReturn("Brother"); when(rs.getString("mc_certificateno")).thenReturn("00015"); when(rs.getLong("mc_certificatedate")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mc_certificatetype")).thenReturn(CertificateType.REGISTRATION.toString()); when(rs.getString("mc_regnnumber")).thenReturn("00015"); when(rs.getString("mc_bridegroomphoto")).thenReturn("NoPhoto"); when(rs.getString("mc_bridephoto")).thenReturn("NoPhoto"); when(rs.getString("mc_husbandname")).thenReturn("Mural"); when(rs.getString("mc_husbandaddress")).thenReturn("Bangalore"); when(rs.getString("mc_wifename")).thenReturn("Sangeet"); when(rs.getString("mc_wifeaddress")).thenReturn("Bangalore"); when(rs.getLong("mc_marriagedate")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mc_marriagevenueaddress")).thenReturn("FUNCTION_HALL"); when(rs.getLong("mc_regndate")).thenReturn(Long.valueOf("9874563210")); when(rs.getString("mc_regnserialno")).thenReturn("00015"); when(rs.getString("mc_regnvolumeno")).thenReturn("2"); when(rs.getString("mc_certificateplace")).thenReturn("Bangalore"); when(rs.getString("mc_templateversion")).thenReturn("00015"); when(rs.getString("mc_applicationnumber")).thenReturn("00015"); when(rs.getString("mc_tenantid")).thenReturn("ap.kurnool"); MarriageRegnRowMapper marriageRegnRowMapper = new MarriageRegnRowMapper(); List<MarriageRegn> marriageRegns = marriageRegnRowMapper.extractData(rs); System.err.println(marriageRegns.get(0)); System.err.println(getMarriageRegn()); }
@Override public List<MarriageRegn> extractData(ResultSet rs) throws SQLException, DataAccessException { Map<String, MarriageRegnInfo> marriageRegnInfoMap = getMarriageRegnInfoMap(rs); List<MarriageRegn> marriageRegnList = getMarriageRegnList(marriageRegnInfoMap); return marriageRegnList; }
MarriageRegnRowMapper implements ResultSetExtractor<List<MarriageRegn>> { @Override public List<MarriageRegn> extractData(ResultSet rs) throws SQLException, DataAccessException { Map<String, MarriageRegnInfo> marriageRegnInfoMap = getMarriageRegnInfoMap(rs); List<MarriageRegn> marriageRegnList = getMarriageRegnList(marriageRegnInfoMap); return marriageRegnList; } }
MarriageRegnRowMapper implements ResultSetExtractor<List<MarriageRegn>> { @Override public List<MarriageRegn> extractData(ResultSet rs) throws SQLException, DataAccessException { Map<String, MarriageRegnInfo> marriageRegnInfoMap = getMarriageRegnInfoMap(rs); List<MarriageRegn> marriageRegnList = getMarriageRegnList(marriageRegnInfoMap); return marriageRegnList; }  }
MarriageRegnRowMapper implements ResultSetExtractor<List<MarriageRegn>> { @Override public List<MarriageRegn> extractData(ResultSet rs) throws SQLException, DataAccessException { Map<String, MarriageRegnInfo> marriageRegnInfoMap = getMarriageRegnInfoMap(rs); List<MarriageRegn> marriageRegnList = getMarriageRegnList(marriageRegnInfoMap); return marriageRegnList; }  @Override List<MarriageRegn> extractData(ResultSet rs); }
MarriageRegnRowMapper implements ResultSetExtractor<List<MarriageRegn>> { @Override public List<MarriageRegn> extractData(ResultSet rs) throws SQLException, DataAccessException { Map<String, MarriageRegnInfo> marriageRegnInfoMap = getMarriageRegnInfoMap(rs); List<MarriageRegn> marriageRegnList = getMarriageRegnList(marriageRegnInfoMap); return marriageRegnList; }  @Override List<MarriageRegn> extractData(ResultSet rs);  }