### Question:
ConfigFactory { public static ConfigFactory getInstance(String type) { if (type.equals("text")) return new TextConfigFactory(); if (type.equals("file")) return new FileConfigFactory(); if (type.equals("classpath")) return new ClasspathConfigFactory(); return null; }  static ConfigFactory getInstance(String type); abstract Config create(String value); abstract boolean isReloadSupported();  }### Answer:
@Test public void getFileConfigFactory() { ConfigFactory factory = ConfigFactory.getInstance("file"); assertTrue(factory instanceof FileConfigFactory); }
@Test public void getClasspathConfigFactory() { ConfigFactory factory = ConfigFactory.getInstance("classpath"); assertTrue(factory instanceof ClasspathConfigFactory); }
@Test public void getTextConfigFactory() { ConfigFactory factory = ConfigFactory.getInstance("text"); assertTrue(factory instanceof TextConfigFactory); }