chore: fix UT
@@ -23,6 +23,7 @@ import io.gravitee.gateway.handlers.api.manager.ApiManager;
import io.gravitee.gateway.services.sync.builder.RepositoryApiBuilder;
import io.gravitee.repository.exceptions.TechnicalException;
import io.gravitee.repository.management.api.ApiRepository;
+import io.gravitee.repository.management.api.DictionaryRepository;
import io.gravitee.repository.management.api.EventRepository;
import io.gravitee.repository.management.api.PlanRepository;
import io.gravitee.repository.management.api.search.ApiFieldExclusionFilter;
@@ -68,6 +69,9 @@ public class SyncManagerTest {
@Mock
private EventRepository eventRepository;
+ @Mock
+ private DictionaryRepository dictionaryRepository;
+
@Mock
private ApiManager apiManager;
@@ -78,8 +82,9 @@ public class SyncManagerTest {
private GatewayConfiguration gatewayConfiguration;
@Before
- public void setUp() {
+ public void setUp() throws Exception {
when(gatewayConfiguration.shardingTags()).thenReturn(Optional.empty());
+ when(dictionaryRepository.findAll()).thenReturn(Collections.emptySet());
}
@Test
