@Test public void testSave() { when(jdbcTemplate.update(any(String.class), Matchers.<Object[]>any())).thenReturn(1); witnessRepository.save("2", "ap.kurnool", getWitness()); }
public void save(String applicationNumber, String tenantId, Witness witness) { Object[] obj = new Object[]{witness.getId(), applicationNumber, tenantId, witness.getWitnessNo(), witness.getName(), witness.getRelationForIdentification(), witness.getRelatedTo().toString(), witness.getDob(), witness.getAddress(), witness.getRelationshipWithApplicants(), witness.getOccupation(), witness.getAadhaar(), witness.getMobileNo(), witness.getEmail() }; jdbcTemplate.update(INSERT_WITNESS_QUERY, obj); }
WitnessRepository { public void save(String applicationNumber, String tenantId, Witness witness) { Object[] obj = new Object[]{witness.getId(), applicationNumber, tenantId, witness.getWitnessNo(), witness.getName(), witness.getRelationForIdentification(), witness.getRelatedTo().toString(), witness.getDob(), witness.getAddress(), witness.getRelationshipWithApplicants(), witness.getOccupation(), witness.getAadhaar(), witness.getMobileNo(), witness.getEmail() }; jdbcTemplate.update(INSERT_WITNESS_QUERY, obj); } }
WitnessRepository { public void save(String applicationNumber, String tenantId, Witness witness) { Object[] obj = new Object[]{witness.getId(), applicationNumber, tenantId, witness.getWitnessNo(), witness.getName(), witness.getRelationForIdentification(), witness.getRelatedTo().toString(), witness.getDob(), witness.getAddress(), witness.getRelationshipWithApplicants(), witness.getOccupation(), witness.getAadhaar(), witness.getMobileNo(), witness.getEmail() }; jdbcTemplate.update(INSERT_WITNESS_QUERY, obj); }  }
WitnessRepository { public void save(String applicationNumber, String tenantId, Witness witness) { Object[] obj = new Object[]{witness.getId(), applicationNumber, tenantId, witness.getWitnessNo(), witness.getName(), witness.getRelationForIdentification(), witness.getRelatedTo().toString(), witness.getDob(), witness.getAddress(), witness.getRelationshipWithApplicants(), witness.getOccupation(), witness.getAadhaar(), witness.getMobileNo(), witness.getEmail() }; jdbcTemplate.update(INSERT_WITNESS_QUERY, obj); }  void save(String applicationNumber, String tenantId, Witness witness); void update(String applicationNumber, String tenantId, Witness witness); void delete(String applicationNumber, String tenantId); String getNextId(); }
WitnessRepository { public void save(String applicationNumber, String tenantId, Witness witness) { Object[] obj = new Object[]{witness.getId(), applicationNumber, tenantId, witness.getWitnessNo(), witness.getName(), witness.getRelationForIdentification(), witness.getRelatedTo().toString(), witness.getDob(), witness.getAddress(), witness.getRelationshipWithApplicants(), witness.getOccupation(), witness.getAadhaar(), witness.getMobileNo(), witness.getEmail() }; jdbcTemplate.update(INSERT_WITNESS_QUERY, obj); }  void save(String applicationNumber, String tenantId, Witness witness); void update(String applicationNumber, String tenantId, Witness witness); void delete(String applicationNumber, String tenantId); String getNextId(); static final String INSERT_WITNESS_QUERY; static final String UPDATE_WITNESS_QUERY; static final String DELETE_WITNESS_QUERY; }