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