@Test public void testCreateLocalFileReader() { ContentReader reader = factory.createContentReader(LOCAL_TYPE); assertTrue(reader instanceof LocalFileReader); }
public ContentReader createContentReader(String type) { if (type.equals("local")) { return new LocalFileReader(); } else if (type.equals("web")) { return new WebFileReader(); } else { return new NullFileReader(); } }
ContentReaderFactory { public ContentReader createContentReader(String type) { if (type.equals("local")) { return new LocalFileReader(); } else if (type.equals("web")) { return new WebFileReader(); } else { return new NullFileReader(); } } }
ContentReaderFactory { public ContentReader createContentReader(String type) { if (type.equals("local")) { return new LocalFileReader(); } else if (type.equals("web")) { return new WebFileReader(); } else { return new NullFileReader(); } }  }
ContentReaderFactory { public ContentReader createContentReader(String type) { if (type.equals("local")) { return new LocalFileReader(); } else if (type.equals("web")) { return new WebFileReader(); } else { return new NullFileReader(); } }  ContentReader createContentReader(String type); }
ContentReaderFactory { public ContentReader createContentReader(String type) { if (type.equals("local")) { return new LocalFileReader(); } else if (type.equals("web")) { return new WebFileReader(); } else { return new NullFileReader(); } }  ContentReader createContentReader(String type);  }