### Question:
Jsf11PropertyResolverAdapter extends PropertyResolver { @Override public Object getValue(Object target, Object property) throws EvaluationException, PropertyNotFoundException { return resolver.getValue(target, property, getType(target, property)); } Jsf11PropertyResolverAdapter(MockingPropertyResolver resolver); @Override Class<?> getType(Object target, Object property); @Override Class<?> getType(Object target, int index); @Override Object getValue(Object target, Object property); @Override Object getValue(Object target, int property); @Override boolean isReadOnly(Object arg0, Object arg1); @Override boolean isReadOnly(Object arg0, int arg1); @Override void setValue(Object arg0, Object arg1, Object arg2); @Override void setValue(Object arg0, int arg1, Object arg2);  }### Answer:
@Test(expected = PropertyNotFoundException.class) public void should_throw_exception_for_unknown_property() throws Exception { resolver.getValue(currentVariable, "unknownProperty"); }
@Test public void should_return_MockObjectOfUnknownType_for_existing_mapped_property_without_declard_component_type() throws Exception { assertThat(resolver.getValue(Collections.EMPTY_MAP, "unknownProperty") , is(instanceOf(MockObjectOfUnknownType.class))); }
@Test public void should_return_MockObjectOfUnknownType_for_existing_list_property_without_declard_component_type() throws Exception { assertThat(resolver.getValue(Collections.EMPTY_LIST, randomIndex()) , is(instanceOf(MockObjectOfUnknownType.class))); }
@Test public void should_return_MockObjectOfUnknownType_for_existing_array_property_without_declard_component_type() throws Exception { assertThat(resolver.getValue(new Object[0], randomIndex()) , is(instanceOf(MockObjectOfUnknownType.class))); }
@Test public void should_return_string_for_existing_string_array_property() throws Exception { assertThat(resolver.getValue(new String[0], randomIndex()) , is(instanceOf(String.class))); }
@Test public void should_return_declared_component_type_for_existing_mapped_property() throws Exception { trueResolver.definePropertyTypeOverride(CURRENT_VARIABLE + ".*", Runnable.class); assertThat(resolver.getValue(Collections.EMPTY_MAP, "unknownProperty") , is(instanceOf(Runnable.class))); }
@Test public void should_return_declared_component_type_for_existing_list_property() throws Exception { trueResolver.definePropertyTypeOverride(CURRENT_VARIABLE + ".*", Cloneable.class); assertThat(resolver.getValue(Collections.EMPTY_LIST, randomIndex()) , is(instanceOf(Cloneable.class))); }
@Test public void should_return_declared_component_type_for_existing_array_property() throws Exception { trueResolver.definePropertyTypeOverride(CURRENT_VARIABLE + ".*", Float.class); assertThat(resolver.getValue(new Object[0], randomIndex()) , is(instanceOf(Number.class))); }