### Question:
DefaultAopProxyBeanFactory implements AopProxyBeanFactory { @Override public Object createAopProxyBean(AopProxySupport config) { if (config.getBeanClass().isInterface() || (!config.isOptimze() && config.getInterfaces() != null && config.getInterfaces().size() > 0)) { return new JavassistProxy(config).getProxy(); } return new CglibProxy(config).getProxy(); }  @Override Object createAopProxyBean(AopProxySupport config);  }### Answer:
@Test public void createAopProxyBean() { AopProxyBeanFactory aopProxyBeanFactory = new DefaultAopProxyBeanFactory(); AopProxySupport support = new AopProxySupport(); ProxyInterface proxyBean = new ProxyBean(); support.setBean(proxyBean); support.setBeanClass(ProxyBean.class); List<Class<?>> interfaces = new ArrayList<>(); interfaces.add(ProxyInterface.class); support.setInterfaces(interfaces); proxyBean = (ProxyInterface) aopProxyBeanFactory.createAopProxyBean(support); assert proxyBean instanceof TargetClassAware; TargetClassAware targetClassAware = (TargetClassAware) proxyBean; assert targetClassAware.getTargetClass().isAnnotationPresent(Named.class); assert AopUtils.isProxy(proxyBean); }