/** * This is a service method to test transaction * * @throws Exception */ @Override public void insertCountryForTransactionTesting() throws Exception { /* Insert a country */ Country country = new Country(); country.setCountryName("Brazil"); countryMapper.insert(country); /* Throw an exception */ throw new RuntimeException(); }