// ResourceBundleFactory
ICUResourceBundleFactory rbf = new ICUResourceBundleFactory();
logln("RB: " + rbf.create(lkey, null));
// ICUNotifier
ICUNotifier nf = new ICUNSubclass();
try {
nf.addListener(null);
errln("added null listener");
}
catch (NullPointerException e) {
logln(e.getMessage());
}
catch (Exception e) {
errln("got wrong exception");
}
try {
nf.addListener(new WrongListener());
errln("added wrong listener");
}
catch (IllegalStateException e) {
logln(e.getMessage());
}
catch (Exception e) {
errln("got wrong exception");
}
try {
nf.removeListener(null);
errln("removed null listener");
}
catch (NullPointerException e) {
logln(e.getMessage());
}
catch (Exception e) {
errln("got wrong exception");
}
nf.removeListener(new MyListener());
nf.notifyChanged();
nf.addListener(new MyListener());
nf.removeListener(new MyListener());
}