@Test public void testReset() { System.out.println("reset"); PowerMockito.mockStatic(JMeterUtils.class); PowerMockito.when(JMeterUtils.getProperty("jmeterPlugin.customColorsDispatcher")).thenReturn("custompalette"); PowerMockito.when(JMeterUtils.getProperty("jmeterPlugin.customColorsDispatcher.options")).thenReturn(null); ColorsDispatcher instance = ColorsDispatcherFactory.getColorsDispatcher(); Color first = instance.getNextColor(); Assert.assertNotNull(first); instance.getNextColor(); instance.getNextColor(); instance.reset(); assertEquals(first, instance.getNextColor()); }
@Override public void reset() { i = 0; }
CustomPalette implements ColorsDispatcher { @Override public void reset() { i = 0; } }
CustomPalette implements ColorsDispatcher { @Override public void reset() { i = 0; } CustomPalette(String options); }
CustomPalette implements ColorsDispatcher { @Override public void reset() { i = 0; } CustomPalette(String options); @Override void reset(); @Override Color getNextColor(); }
CustomPalette implements ColorsDispatcher { @Override public void reset() { i = 0; } CustomPalette(String options); @Override void reset(); @Override Color getNextColor();  }