- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Dictionary d =
new Hashtable()
Bundle bundle;bundle.getHeaders()
new Properties()
- Smart code suggestions by Codota
}
@Test public void testOnNewJobModelShouldResultInValidStateTransitions() throws Exception { JobCoordinator mockJobCoordinator = Mockito.mock(JobCoordinator.class); ProcessorLifecycleListener lifecycleListener = Mockito.mock(ProcessorLifecycleListener.class); SamzaContainer mockSamzaContainer = Mockito.mock(SamzaContainer.class); MapConfig config = new MapConfig(ImmutableMap.of("task.shutdown.ms", "0")); StreamProcessor streamProcessor = new TestableStreamProcessor(config, new HashMap<>(), null, lifecycleListener, mockJobCoordinator, mockSamzaContainer); streamProcessor.state = State.IN_REBALANCE; Mockito.doNothing().when(mockSamzaContainer).run(); streamProcessor.jobCoordinatorListener.onNewJobModel("TestProcessorId", new JobModel(new MapConfig(), new HashMap<>())); Mockito.verify(mockSamzaContainer, Mockito.times(1)).setContainerListener(any()); Mockito.verify(mockSamzaContainer, Mockito.atMost(1)).run(); }
container.run(); if (heartbeatMonitor != null) { heartbeatMonitor.stop();
container.run(); if (heartbeatMonitor != null) { heartbeatMonitor.stop();
container.run(); if (heartbeatMonitor != null) { heartbeatMonitor.stop();
container.run(); if (heartbeatMonitor != null) { heartbeatMonitor.stop();
container.run(); if (heartbeatMonitor != null) { heartbeatMonitor.stop();