private void validateCountry(EntityTestCriteria contraints, Country country) throws Exception {
   if (contraints.getRuleType() == MIN_MAX) {
     country.isValid();
   } else if (contraints.getRuleType() == NOT_NULL) {
     country.isValid();
   } else if (contraints.getRuleType() == REGEX) {
     country.isValid();
   } else if (contraints.getRuleType() == UNIQUE) {
     countryRepository.save(country);
   }
 }
 @Test
 public void test1Save() {
   try {
     Country country = createCountry(true);
     country.setEntityAudit(1, "xyz", RECORD_TYPE.ADD);
     country.isValid();
     countryRepository.save(country);
     map.put("CountryPrimaryKey", country._getPrimarykey());
   } catch (com.athena.framework.server.exception.biz.SpartanConstraintViolationException e) {
     org.junit.Assert.fail(e.getMessage());
   } catch (java.lang.Exception e) {
     org.junit.Assert.fail(e.getMessage());
   }
 }