DataReaderFactory extends AbstractIOFactory<DataReader> { public static DataReaderFactory getInstance() { if (instance == null) { try { instance = new DataReaderFactory(); } catch (IOException e) { throw new RuntimeException(e); } } return instance; } private  DataReaderFactory(); static DataReaderFactory getInstance(); @Override DataReader get(String mimeType);  }
@Test public void testInstance() { DataReaderFactory instance1 = DataReaderFactory.getInstance(); assertNotNull(instance1); DataReaderFactory instance2 = DataReaderFactory.getInstance(); assertSame(instance1, instance2); }