use of io.gravitee.rest.api.model.configuration.dictionary.DictionaryEntity in project gravitee-management-rest-api by gravitee-io.
the class DictionaryManagerTest method shouldNotStartAlreadyStarted.
@Test
public void shouldNotStartAlreadyStarted() {
final DictionaryProviderEntity provider = new DictionaryProviderEntity();
provider.setConfiguration(JsonNodeFactory.instance.nullNode());
final DictionaryEntity dictionary = new DictionaryEntity();
dictionary.setUpdatedAt(new Date());
dictionary.setProvider(provider);
dictionary.setId(DICTIONARY_ID);
when(dictionaryService.findById(DICTIONARY_ID)).thenReturn(dictionary);
cut.start(DICTIONARY_ID);
verify(eventManager, times(1)).publishEvent(eq(DictionaryEvent.START), eq(dictionary));
cut.start(DICTIONARY_ID);
verifyNoMoreInteractions(eventManager);
}
Aggregations