ValueContext implements Serializable { @SuppressWarnings("unused") public Optional<HasValue<?, ?>> getHasValue() { return Optional.ofNullable(hasValue); } ValueContext();  ValueContext(Locale locale);  ValueContext(Component component);  ValueContext(Component component, HasValue<?, ?> hasValue);  ValueContext(Component component, HasValue<?, ?> hasValue,
            Locale locale); Optional<Component> getComponent(); Optional<Locale> getLocale(); @SuppressWarnings("unused") Optional<HasValue<?, ?>> getHasValue();  }
@Test public void testHasValue1() { setLocale(Locale.getDefault()); ValueContext fromComponent = new ValueContext(textField); Assert.assertEquals(textField, fromComponent.getHasValue().get()); }
@Test public void testHasValue2() { setLocale(Locale.getDefault()); ValueContext fromComponent = new ValueContext(new TestDatePicker(), textField); Assert.assertEquals(textField, fromComponent.getHasValue().get()); }