### Question:
StaticValueDispatcher extends AbstractPropertyDispatcherDecorator { @SuppressWarnings("unchecked") @Override public <T> T pull(Aspect<T> aspect) { if (aspect.isValuePresent()) { T staticValue = aspect.getValue(); Object boundObject = getBoundObject(); if (staticValue instanceof String && boundObject != null) { Class<?> pmoClass = getTypeForKey(boundObject); staticValue = (T)PmoNlsService.get() .getLabel(pmoClass, getProperty(), aspect.getName(), (String)staticValue); } if (LinkkiAspectDefinition.DERIVED_BY_LINKKI.equals(staticValue)) { return (T)StringUtils.capitalize(getProperty()); } return staticValue; } else { return super.pull(aspect); } } StaticValueDispatcher(PropertyDispatcher wrappedDispatcher); @SuppressWarnings("unchecked") @Override T pull(Aspect<T> aspect);  }### Answer:
@Test public void testGetValue() { Aspect<Object> newDynamic = Aspect.of(""); pull(XYZ, newDynamic); verify(uiAnnotationFallbackDispatcher).pull(newDynamic); }
@Test public void testGetDerivedValue() { Aspect<String> derived = Aspect.of("", LinkkiAspectDefinition.DERIVED_BY_LINKKI); when(uiAnnotationFallbackDispatcher.getProperty()).thenReturn("foo"); assertThat(pull("foo", derived), is("Foo")); }
@Test public void testPull_static() { Aspect<ArrayList<Object>> staticAspect = Aspect.of(EnabledAspectDefinition.NAME, new ArrayList<>()); pull(STATIC_ENUM_ATTR, staticAspect); verify(uiAnnotationFallbackDispatcher, never()).pull(staticAspect); }
@Test public void testPull_dynamic() { Aspect<ArrayList<Object>> dynamicAspect = Aspect.of(EnabledAspectDefinition.NAME); pull(DYNAMIC_ENUM_ATTR, dynamicAspect); verify(uiAnnotationFallbackDispatcher).pull(dynamicAspect); }