@Test public void getDerivedLetsThePropertyParserFactoryCreateAPropertyParser() { instance.getDerived("relationName", "propertyName", "accepted", String.class); verify(parserFactory).getParser(String.class); }
private PropertyDescriptor getDerived(String relationName, String propertyName, String acceptedPropertyName, PropertyParser parser) { return new RelatedPropertyDescriptor(relationName, propertyName, acceptedPropertyName, parser); }
PropertyDescriptorFactory { private PropertyDescriptor getDerived(String relationName, String propertyName, String acceptedPropertyName, PropertyParser parser) { return new RelatedPropertyDescriptor(relationName, propertyName, acceptedPropertyName, parser); } }
PropertyDescriptorFactory { private PropertyDescriptor getDerived(String relationName, String propertyName, String acceptedPropertyName, PropertyParser parser) { return new RelatedPropertyDescriptor(relationName, propertyName, acceptedPropertyName, parser); } PropertyDescriptorFactory(PropertyParserFactory parserFactory); }
PropertyDescriptorFactory { private PropertyDescriptor getDerived(String relationName, String propertyName, String acceptedPropertyName, PropertyParser parser) { return new RelatedPropertyDescriptor(relationName, propertyName, acceptedPropertyName, parser); } PropertyDescriptorFactory(PropertyParserFactory parserFactory); PropertyDescriptor getLocal(String propertyName, PropertyParser parser); PropertyDescriptor getLocal(String propertyName, Class<?> typeToParse); PropertyDescriptor getLocal(String propertyName, PropertyParser parser, String prefix, String postfix); PropertyDescriptor getLocal(String propertyName, Class<?> typeToConvert, String prefix, String postfix); PropertyDescriptor getLocal(String propertyName, String separator); PropertyDescriptor getComposite(PropertyDescriptor preferred, PropertyDescriptor backUp); PropertyDescriptor getDerived(String relationName, String propertyName, String acceptedPropertyName,
                                       Class<?> typeToParse); PropertyDescriptor getDerivedWithSeparator(String relationName, String propertyName, PropertyParser parser,
                                                    String acceptedPropertyName, String separator); PropertyDescriptor getAppender(PropertyDescriptor first, PropertyDescriptor second, String separator); }
PropertyDescriptorFactory { private PropertyDescriptor getDerived(String relationName, String propertyName, String acceptedPropertyName, PropertyParser parser) { return new RelatedPropertyDescriptor(relationName, propertyName, acceptedPropertyName, parser); } PropertyDescriptorFactory(PropertyParserFactory parserFactory); PropertyDescriptor getLocal(String propertyName, PropertyParser parser); PropertyDescriptor getLocal(String propertyName, Class<?> typeToParse); PropertyDescriptor getLocal(String propertyName, PropertyParser parser, String prefix, String postfix); PropertyDescriptor getLocal(String propertyName, Class<?> typeToConvert, String prefix, String postfix); PropertyDescriptor getLocal(String propertyName, String separator); PropertyDescriptor getComposite(PropertyDescriptor preferred, PropertyDescriptor backUp); PropertyDescriptor getDerived(String relationName, String propertyName, String acceptedPropertyName,
                                       Class<?> typeToParse); PropertyDescriptor getDerivedWithSeparator(String relationName, String propertyName, PropertyParser parser,
                                                    String acceptedPropertyName, String separator); PropertyDescriptor getAppender(PropertyDescriptor first, PropertyDescriptor second, String separator);  }