### Question:
ApplicableTypeAspectDefinition extends ApplicableAspectDefinition { public static ApplicableTypeAspectDefinition ifComponentTypeIs(Class<?> applicableType, LinkkiAspectDefinition wrappedAspectDefinition) { return new ApplicableTypeAspectDefinition(wrappedAspectDefinition, applicableType); } private  ApplicableTypeAspectDefinition(LinkkiAspectDefinition wrappedAspectDefinition, Class<?> applicableType); static ApplicableTypeAspectDefinition ifComponentTypeIs(Class<?> applicableType,
            LinkkiAspectDefinition wrappedAspectDefinition);  }### Answer:
@Test public final void testCreateUiUpdater() { ApplicableTypeAspectDefinition aspectDef = ApplicableTypeAspectDefinition .ifComponentTypeIs(TestUiComponent.class, aspectDefinition); when(aspectDefinition.createUiUpdater(propertyDispatcher, componentWrapper)).thenReturn(modelUpdated); Handler uiUpdater = aspectDef.createUiUpdater(propertyDispatcher, componentWrapper); verify(aspectDefinition).createUiUpdater(propertyDispatcher, componentWrapper); assertThat(uiUpdater, is(modelUpdated)); }
@Test public final void testCreateUiUpdater_NotApplicable() { ApplicableTypeAspectDefinition aspectDef = ApplicableTypeAspectDefinition.ifComponentTypeIs(String.class, aspectDefinition); aspectDef.createUiUpdater(propertyDispatcher, componentWrapper); verify(aspectDefinition, never()).createUiUpdater(any(PropertyDispatcher.class), any(ComponentWrapper.class)); }
@Test public final void testInitModelUpdate() { ApplicableTypeAspectDefinition aspectDef = ApplicableTypeAspectDefinition .ifComponentTypeIs(TestUiComponent.class, aspectDefinition); aspectDef.initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); verify(aspectDefinition).initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); }
@Test public final void testInitModelUpdate_NotApplicable() { ApplicableTypeAspectDefinition aspectDef = ApplicableTypeAspectDefinition.ifComponentTypeIs(List.class, aspectDefinition); aspectDef.initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); verify(aspectDefinition, never()).initModelUpdate(any(PropertyDispatcher.class), any(ComponentWrapper.class), any(Handler.class)); }