### Question:
GameResourceManager extends AbstractMongoManager { public String getGameResource(String id, Locale locale, String defaultValue) { HashMap<Locale, String> localeMap = dataMap.get(id); if ( localeMap == null ) { return defaultValue; } else { String value = localeMap.get(locale); if ( value == null ) { return defaultValue; } else { return value; } } } GameResourceManager(); static GameResourceManager getInstance(); void reload(); HashMap<String, HashMap<Locale, String>> getGameResources(); Set<Locale> getAllLocales(); String getGameResource(String id, Locale locale, String defaultValue); static final Locale DEFAULT_LOCALE; }### Answer:
@Test public void testGetGameResource() { WeaponPojo weapon = EquipManager.getInstance().getWeaponById(UserManager.basicWeaponItemId); String res = GameResourceManager.getInstance().getGameResource("equipments_new_name_"+weapon.getId(), Locale.TRADITIONAL_CHINESE, "haha"); assertEquals("黑鐵●榴弹炮", res); }