### Question:
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setEnabled; } EnabledAspectDefinition(EnabledType enabledType); @Override Aspect<Boolean> createAspect(); @Override Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper); static final String NAME; }### Answer:
@Test public void testCreateComponentValueSetterComponentWrapper() { EnabledAspectDefinition aspectDefinition = new EnabledAspectDefinition( EnabledType.ENABLED); Consumer<Boolean> setter = aspectDefinition.createComponentValueSetter(componentWrapper); assertThat(componentWrapper.getComponent().isEnabled(), is(false)); setter.accept(true); assertThat(componentWrapper.getComponent().isEnabled(), is(true)); }