### Question:
FilterFactories { static FilterFactory createFilterFactory(String filterFactoryFqcn) throws FilterNotCreatedException { Class<? extends FilterFactory> filterFactoryClass; try { filterFactoryClass = Classes.getClass(filterFactoryFqcn).asSubclass(FilterFactory.class); } catch (Exception e) { throw new FilterNotCreatedException(e); } return createFilterFactory(filterFactoryClass); }  static Filter createFilterFromFilterSpec(Request request, String filterSpec); static Filter createFilter(String filterFactoryFqcn, FilterFactoryParams params); static Filter createFilter(Class<? extends FilterFactory> filterFactoryClass, FilterFactoryParams params);  }### Answer:
@Test public void shouldThrowExceptionIfNotFilterFactory() throws Exception { expectedException.expect(FilterFactory.FilterNotCreatedException.class); FilterFactories.createFilterFactory(NonFilterFactory.class.getName()); }
@Test public void shouldThrowExceptionIfNotInstantiable() throws Exception { expectedException.expect(FilterFactory.FilterNotCreatedException.class); FilterFactories.createFilterFactory(NonInstantiableFilterFactory.class); }