### Question:
QuestionsAndAnswersPlugin extends WebControllerPlugin implements TopicPlugin { @Override public String translateLabel(String code, Locale locale) { ResourceBundle messages = ResourceBundle.getBundle(MESSAGE_PATH, locale); if (messages.containsKey(code)) { return messages.getString(code); } else { ResourceBundle defaultMessages = ResourceBundle.getBundle(MESSAGE_PATH, new Locale(DEFAULT_LOCALE_CODE)); return defaultMessages.containsKey(code) ? defaultMessages.getString(code) : code; } }  @Override String getName(); @Override List<PluginProperty> getConfiguration(); @Override boolean supportsJCommuneVersion(String version); @Override List<PluginProperty> getDefaultConfiguration(); @Override String translateLabel(String code, Locale locale); @SuppressWarnings("unchecked") @Override List<T> getBranchPermissions(); @Override CreateTopicBtnDto getCreateTopicBtnDto(long branchId); @Override JtalksPermission getCreateTopicPermission(); @Override JtalksPermission getBranchPermissionByMask(int mask); @Override JtalksPermission getBranchPermissionByName(String name); @Override PluginController getController(); @Override String getTopicType(); @Override JtalksPermission getCommentPermission(); @Override SubscribersFilter getSubscribersFilter(); static final String TOPIC_TYPE; static final String CONTEXT; static final String MESSAGE_PATH; }### Answer:
@Test public void translateLabelWithExistingTranslation() { assertEquals("Ask Question", new QuestionsAndAnswersPlugin().translateLabel("label.addQuestion", Locale.forLanguageTag("en"))); }
@Test public void translateLabelWithoutExistingTranslation() { assertEquals("label.unexisted", new QuestionsAndAnswersPlugin().translateLabel("label.unexisted", Locale.forLanguageTag("en"))); }