### Question:
YearsMonthsSelectorView implements YearsMonthsSelector.View { @Override public void setValue(final YearsMonthsValue value) { yearInput.value = value.getYears(); monthInput.value = value.getMonths(); } @Inject  YearsMonthsSelectorView(final HTMLInputElement yearInput,
                                   final HTMLInputElement monthInput); @Override void init(final YearsMonthsSelectorView presenter); @Override YearsMonthsValue getValue(); @Override void setValue(final YearsMonthsValue value); @Override void setPlaceHolder(final String placeholder); @EventHandler("years-input") void onYearsInputBlur(final BlurEvent blurEvent); @EventHandler("months-input") void onMonthsInputBlur(final BlurEvent blurEvent); @Override void onValueChanged(final Consumer<Event> onValueChanged); @Override void onValueInputBlur(final Consumer<BlurEvent> blurEvent); @Override void select();  }### Answer:
@Test public void testSetValue() { final String months = "months"; final String years = "years"; final YearsMonthsValue yearsMonthsValue = mock(YearsMonthsValue.class); when(yearsMonthsValue.getMonths()).thenReturn(months); when(yearsMonthsValue.getYears()).thenReturn(years); view.setValue(yearsMonthsValue); assertEquals(years, yearInput.value); assertEquals(months, monthInput.value); }