@Test(expected = IllegalArgumentException.class)
public void testRegisterAvailableLocalesNull() {

    AbstractI18nCodeList impl = new AbstractI18nCodeList() {
        @Override
        protected Set<Locale> registerCodeListLocales() {
            return null;
        }
        @Override
        protected Map<String, String> obtainMap(Locale locale) {
            return null;
        }
    };
    impl.afterPropertiesSet();
}