### Question:
SplitAfterRadioButton extends RadioButton implements SplitParametersBuilderCreator, RestorableView, ResettableView { @Override public void restoreStateFrom(Map<String, String> data) { Optional.ofNullable(data.get("splitAfter")).map(Boolean::valueOf).ifPresent(this::setSelected); field.setText(Optional.ofNullable(data.get("splitAfter.field")).orElse(EMPTY)); } SplitAfterRadioButton(ValidableTextField field); @Override SplitByPageParametersBuilder getBuilder(Consumer<String> onError); @Override void saveStateTo(Map<String, String> data); @Override void restoreStateFrom(Map<String, String> data); @Override void resetView();  }### Answer:
@Test public void restoreState() { ValidableTextField field = lookup("#field").queryAs(ValidableTextField.class); Map<String, String> data = new HashMap<>(); data.put("splitAfter", Boolean.TRUE.toString()); data.put("splitAfter.field", "chuck"); victim.restoreStateFrom(data); assertTrue(victim.isSelected()); assertEquals("chuck", field.getText()); }