@Before public void setUp() { when(moduleDescriptor.getName()).thenReturn(PLUGIN_MODULE_NAME); when(moduleDescriptor.getI18nNameKey()).thenReturn(PLUGIN_MODULE_NAME_KEY); module = new PluginModuleImpl(moduleDescriptor, i18nResolver, plugin); }
@Test public void assertThatPluginModuleWithNoI18nKeyReturnsName() { when(moduleDescriptor.getI18nNameKey()).thenReturn(null); assertThat(module.getName(), is(equalTo(PLUGIN_MODULE_NAME))); }