HomeRoutingManagement implements HomeRoutingManagementMBean { @Override public void addCcMccmnc(String countryCode, String mccMnc, String smsc) throws Exception { CcMccmncImpl ccMccmnc = new CcMccmncImpl(countryCode, mccMnc, smsc); ccMccmncCollection.addCcMccmnc(ccMccmnc); this.store(); } private  HomeRoutingManagement(String name); static HomeRoutingManagement getInstance(String name); static HomeRoutingManagement getInstance(); String getName(); String getPersistDir(); void setPersistDir(String persistDir); @Override synchronized NextCorrelationIdResult getNextCorrelationId(String msisdn); @Override void updateCcMccmncTable(); @Override void addCcMccmnc(String countryCode, String mccMnc, String smsc); @Override void modifyCcMccmnc(String countryCode, String mccMnc, String smsc); @Override void removeCcMccmnc(String countryCode); @Override CcMccmnc getCcMccmnc(String countryCode); @Override Map<String, CcMccmncImpl> getCcMccmncMap(); void start(); void stop(); void store(); void storeCorrId(); synchronized void load(); synchronized void loadCorrId();  }
@Test(groups = { "HomeRoutingManagement" }) public void testFunc() throws Exception { CcMccmncCollection original = new CcMccmncCollection(); original.addCcMccmnc(new CcMccmncImpl("1111", "222", "00001")); original.addCcMccmnc(new CcMccmncImpl("", "555", "")); original.addCcMccmnc(new CcMccmncImpl("3333", "444", null)); CcMccmnc s1 = original.findMccmnc("111"); CcMccmnc s2 = original.findMccmnc("1111"); CcMccmnc s3 = original.findMccmnc("11111"); CcMccmnc s4 = original.findMccmnc("33333"); CcMccmnc s5 = original.findMccmnc("4444"); assertEquals(s1.getMccMnc(), "555"); assertEquals(s2.getMccMnc(), "222"); assertEquals(s3.getMccMnc(), "222"); assertEquals(s4.getMccMnc(), "444"); assertEquals(s5.getMccMnc(), "555"); }