EasyMock.eq(SqlJetFileType.MAIN_DB),
EasyMock.eq(PERM_EXCLUSIVE_CREATE))).andStubReturn(file);
// delete()
final SqlJetException cantDelete = new SqlJetIOException(SqlJetIOErrorCode.IOERR_DELETE);
EasyMock.expect(fileSystem.delete(
(File) EasyMock.isNull(), EasyMock.anyBoolean() )
).andStubThrow(cantDelete);
EasyMock.expect(fileSystem.delete( EasyMock.eq(path),
EasyMock.anyBoolean() )).andStubReturn(true);
EasyMock.expect(fileSystem.delete(
(File) EasyMock.or( EasyMock.eq(pathNew), EasyMock.eq(pathReadonly) ),
EasyMock.anyBoolean() )).andStubReturn(false);
// access()
final SqlJetException cantAccess = new SqlJetIOException(SqlJetIOErrorCode.IOERR_ACCESS);
EasyMock.expect(fileSystem.access(null,null)).andStubThrow(cantAccess);
EasyMock.expect(fileSystem.access(
(File) EasyMock.isNull(), (SqlJetFileAccesPermission) EasyMock.anyObject() )