Probability defaultValue = new Probability(0.75d);
ProbabilityParameterControl control = new ProbabilityParameterControl(defaultValue);
JFrame frame = new JFrame();
frame.add(control.getControl(), BorderLayout.CENTER);
FrameFixture frameFixture = new FrameFixture(robot, frame);
frame.setSize(300, 50);
frame.validate();
frame.setVisible(true);
JSlider slider = frameFixture.slider().component();
frameFixture.slider().slideTo(80); // 80 ticks is a probability of 0.8.
control.reset();
assert control.getNumberGenerator().nextValue().equals(defaultValue) : "NumberGenerator reset failed.";
assert slider.getValue() == 75 : "JSlider reset failed.";
String displayedValue = frameFixture.label().text();
assert displayedValue.equals("0.75") : "Wrong value displayed: " + displayedValue;
}