### Question:
GenericFilterCreator implements FilterCreator { @Override public Filter<? extends Serializable> create(String attribute, String value) { return new Filter<>(new Field(attribute, fieldConverter), getTypedValue(attribute, value)); } GenericFilterCreator(AttributeConverter fieldConverter); @Override Filter<? extends Serializable> create(String attribute, String value);  }### Answer:
@Test public void method_create_should_handle_value_as_String_by_default() { GenericFilterCreator creator = new GenericFilterCreator(new AttributeConverter() { @Override public String convert(String attribute) { return attribute; } @Override public Map<String, ItemAttribute.TYPE> getValueTypeMapping() { return Collections.emptyMap(); } }); Filter<? extends Serializable> filter = creator.create("attribute", "value"); assertEquals("attribute", filter.getField()); assertEquals("value", filter.getValue()); }
@Test public void method_create_should_handle_boolean_values() { AttributeConverter converter = new AttributeConverter() { @Override public String convert(String attribute) { return attribute; } @Override public Map<String, ItemAttribute.TYPE> getValueTypeMapping() { return Collections.singletonMap("myAttribute", ItemAttribute.TYPE.BOOLEAN); } }; GenericFilterCreator creator = new GenericFilterCreator(converter); Filter<? extends Serializable> filter = creator.create("myAttribute", "true"); assertThat(filter.getValue()).isEqualTo(true); }