public static CentreBean getCentre(long id) throws SQLException{
String centreid = "JUnit@"+ id +"@"+ System.currentTimeMillis();
CentreBean testCentre = new CentreBean();
Collection<LanguageBean> languages = LanguageFinderBase.findAll();
Language language = languages.iterator().next();
Collection<CountryBean> countries = CountryFinderBase.findAll();
Country country = countries.iterator().next();
Collection<CentretypeBean> centretypes = CentretypeFinderBase.findAll();
Centretype centretype = centretypes.iterator().next();
testCentre.setId(centreid);
testCentre.setCentrename(centreid);
testCentre.setBelongsto(null);
testCentre.setCentreshortname(centreid.substring(0, 9));
testCentre.setTimezone(null);
testCentre.setImportformat(null);
testCentre.setImporting(new Integer(0));
testCentre.setStatus(new Integer(Status.ACTIVE));
testCentre.setLanguageid(language.getLanguageid());
testCentre.setCountryid(country.getId());
testCentre.setTypeid(centretype.getId());
testCentre.setTest(new Integer(1));
testCentre.setDefaultlanguageid(language.getLanguageid());
testCentre.setCreatedby("System");
testCentre.setTscreated(new Timestamp(System.currentTimeMillis()));
testCentre.setUpdatedby("System");
testCentre.setTsupdated(new Timestamp(System.currentTimeMillis()));
return testCentre;
}