CityAnnationService { public City getCity(int id){ return cityAnnationDao.getCity(id); }  City getCity(int id); @Transactional(readOnly = false) void insert(City city);  }
@Test public void testGetCity() throws Exception { City city=cityAnnationService.getCity(1); assertTrue("执行出错！"+city.getName(),"beijin".equals(city.getName())); }