EBInfo { private EBInfo(final String path) throws EBException { super(); _book = new Book(path); } private  EBInfo(final String path); static void main(final String[] args);  }
@Test public void testEBinfo() throws Exception { String bookPath = new File(this.getClass().getResource("/data/epwing").getFile()) .getAbsolutePath(); String expected = "disc type: EPWING V1\n" + "character code: JIS X 0208\n" + "the number of subbooks: 2\n" + "\n" + "subbook 1:\n" + " title: ＴＥＳＴ\n" + " directory: test\n" + " search methods: word exactword\n" + " font sizes:\n" + " narrow font characters:\n" + " wide font characters:\n" + "subbook 2:\n" + " title: \u5730\u540d\n" + " directory: chimei\n" + " search methods: word exactword\n" + " font sizes:\n" + " narrow font characters:\n" + " wide font characters:\n"; String[] args = {"-m", bookPath}; EBInfo.main(args); assertEquals(outContent.toString("UTF-8"), expected); }