StandardWorker implements FsWorker { protected FsException wrapException(Exception e) { if (e instanceof FsException) { return (FsException) e; } return new FsException(e); }  byte[] get(File file); void put(byte[] data, File file);  }
@Test public void testWrapException() { StandardWorker worker = createWorker(); FsException exc= new FsException(); assertEquals(exc, worker.wrapException(exc)); FsFileNotFoundException e3 = new FsFileNotFoundException(); assertEquals(e3, worker.wrapException(e3)); assertEquals(FsException.class, worker.wrapException(new Exception()).getClass()); }