EntityPatientDiscoveryProxyObjectFactory extends ComponentProxyObjectFactory { public EntityPatientDiscoveryProxy getEntityPatientDiscoveryProxy() { return getBean(BEAN_NAME_ENTITY_PATIENT_DISCOVERY, EntityPatientDiscoveryProxy.class); }  EntityPatientDiscoveryProxy getEntityPatientDiscoveryProxy();  }
@Test public void testGetEntityPatientDiscoveryProxyHappy() { EntityPatientDiscoveryProxyObjectFactory proxyFactory = new EntityPatientDiscoveryProxyObjectFactory() { @Override protected <T extends Object> T getBean(String beanName, Class<T> type) { return type.cast(mockProxy); } }; try { EntityPatientDiscoveryProxy proxy = proxyFactory.getEntityPatientDiscoveryProxy(); assertNotNull("EntityPatientDiscoveryProxy was null", proxy); } catch (Throwable t) { System.out.println("Error running testGetEntityPatientDiscoveryProxyHappy test: " + t.getMessage()); t.printStackTrace(); fail("Error running testGetEntityPatientDiscoveryProxyHappy test: " + t.getMessage()); } }