NotificationServiceFactoryImpl implements NotificationServiceFactory { @Override public NotificationService create() { return new EmailNotificationService(new AWSEmailProvider()); }  @Override NotificationService create();  }
@Test public void testCreate() { NotificationServiceFactory factory = new NotificationServiceFactoryImpl(); NotificationService svc = factory.create(); assertNotNull(svc); assertTrue(svc instanceof EmailNotificationService); }