CityService { @Transactional(readOnly = false) public void transation(){ City city=new City("shanghai","SH"); cityDao.insert(city); Integer.parseInt("d"); }  City getCity(int id); @Transactional(readOnly = false) void insert(City city); @Transactional(readOnly = false) void transation();  }
@Test(expected =NumberFormatException.class) public void testTransation() { cityService.transation(); }