<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>asserts/.classpath</filename>
    </added>
    <added>
      <filename>asserts/.project</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,5 @@
 *.iws
+asserts/bin/*
 build/*
 tmp/*
 classes</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,14 @@
 package net.sf.cotta;
 
 import net.sf.cotta.memory.InMemoryFileSystem;
+import net.sf.cotta.test.TestCase;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 
-public class ControlledFileSystemTest extends CottaTestCase {
+public class ControlledFileSystemTest extends TestCase {
   public void testNotAllowUpdateOnNotPermittedDirectories() throws Exception {
     FileSystem fileSystem = fileSystemForTmp();
     fileSystem.createDir(TPath.parse(&quot;tmp/sub&quot;));
@@ -63,7 +64,7 @@ public class ControlledFileSystemTest extends CottaTestCase {
     }
   }
 
-  public void testControlReadOnFileExists() throws Exception {
+  public void testControlReadOnCreateInputStream() throws Exception {
     final TPath path = TPath.parse(&quot;/tmp/text.txt&quot;);
     final InputStream expected = new ByteArrayInputStream(&quot;&quot;.getBytes());
     Mockery context = new Mockery();
@@ -82,5 +83,81 @@ public class ControlledFileSystemTest extends CottaTestCase {
     ensure.that(fileSystem.createInputStream(path)).sameAs(expected);
     context.assertIsSatisfied();
   }
+  
+  public void testControlReadOnFileExists() throws TIoException {
+    final boolean expected = true;
+    final TPath path = TPath.parse(&quot;/tmp/text.txt&quot;);
+    Mockery context = new Mockery();
+    final ControlledFileSystem.Controller controller = context.mock(ControlledFileSystem.Controller.class);
+    final FileSystem fileSystemMock = context.mock(FileSystem.class);
+    context.checking(new Expectations() {
+      {
+        one(controller).readOperationControl(path);
+        one(fileSystemMock).fileExists(path);
+        will(returnValue(expected));
+      }
+    });
+
+    FileSystem fileSystem = new ControlledFileSystem(fileSystemMock, controller);
+    ensure.that(fileSystem.fileExists(path)).eq(expected);
+    context.assertIsSatisfied();
+  }
+
+  public void testControlReadOnDirExists() throws TIoException {
+    final boolean expected = true;
+    final TPath path = TPath.parse(&quot;/tmp&quot;);
+    Mockery context = new Mockery();
+    final ControlledFileSystem.Controller controller = context.mock(ControlledFileSystem.Controller.class);
+    final FileSystem fileSystemMock = context.mock(FileSystem.class);
+    context.checking(new Expectations() {
+      {
+        one(controller).readOperationControl(path);
+        one(fileSystemMock).dirExists(path);
+        will(returnValue(expected));
+      }
+    });
+
+    FileSystem fileSystem = new ControlledFileSystem(fileSystemMock, controller);
+    ensure.that(fileSystem.dirExists(path)).eq(expected);
+    context.assertIsSatisfied();
+  }
+
+  public void testControlReadOnDirFileLength() throws TIoException {
+    final long expected = 111;
+    final TPath path = TPath.parse(&quot;/tmp&quot;);
+    Mockery context = new Mockery();
+    final ControlledFileSystem.Controller controller = context.mock(ControlledFileSystem.Controller.class);
+    final FileSystem fileSystemMock = context.mock(FileSystem.class);
+    context.checking(new Expectations() {
+      {
+        one(controller).readOperationControl(path);
+        one(fileSystemMock).fileLength(path);
+        will(returnValue(expected));
+      }
+    });
+
+    FileSystem fileSystem = new ControlledFileSystem(fileSystemMock, controller);
+    ensure.that(fileSystem.fileLength(path)).eq(expected);
+    context.assertIsSatisfied();
+  }
+
+  public void testControlReadOnDirFileLastModified() throws TIoException {
+    final long expected = 1341234;
+    final TPath path = TPath.parse(&quot;/tmp&quot;);
+    Mockery context = new Mockery();
+    final ControlledFileSystem.Controller controller = context.mock(ControlledFileSystem.Controller.class);
+    final FileSystem fileSystemMock = context.mock(FileSystem.class);
+    context.checking(new Expectations() {
+      {
+        one(controller).readOperationControl(path);
+        one(fileSystemMock).fileLastModified(path);
+        will(returnValue(expected));
+      }
+    });
+
+    FileSystem fileSystem = new ControlledFileSystem(fileSystemMock, controller);
+    ensure.that(fileSystem.fileLastModified(path)).eq(expected);
+    context.assertIsSatisfied();
+  }
 
 }</diff>
      <filename>core/behaviour/src/net/sf/cotta/ControlledFileSystemTest.java</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 abstract public class CottaTestCase extends TestCase {
-  public List&lt;Closeable&gt; resourcesToClose;
 
   public static CottaAssertionFactory ensure = new CottaAssertionFactory();
 
@@ -29,24 +28,4 @@ abstract public class CottaTestCase extends TestCase {
     return ensure.code(block).throwsException(exceptionClass);
   }
 
-  public void registerToClose(Closeable resource) {
-    resourcesToClose.add(resource);
-  }
-
-  public void beforeMethod() throws Exception {
-    resourcesToClose = new ArrayList&lt;Closeable&gt;();
-  }
-
-  public void afterMethod() throws TIoException {
-    if (resourcesToClose == null) {
-      return;
-    }
-    for (Closeable aResourcesToClose : resourcesToClose) {
-      try {
-        (aResourcesToClose).close();
-      } catch (Exception e) {
-        // ignore exception
-      }
-    }
-  }
 }</diff>
      <filename>core/behaviour/src/net/sf/cotta/CottaTestCase.java</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,6 @@ import org.jmock.Mockery;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.Closeable;
 
 public class TDirectoryTest extends PhysicalFileSystemTestCase {
   public void testExistAfterCreate() throws Exception {
@@ -56,7 +55,7 @@ public class TDirectoryTest extends PhysicalFileSystemTestCase {
     ensure.that(file.exists()).eq(false);
   }
 
-  public void testBeAbleToInstantiateASubDirectory() {
+  public void testBeAbleToInstantiateASubDirectory() throws TIoException {
     TDirectory directory = factory().dir(&quot;parent&quot;).dir(&quot;test&quot;).dir(&quot;sub&quot;);
     ensure.that(directory.exists()).eq(false);
   }
@@ -240,7 +239,7 @@ public class TDirectoryTest extends PhysicalFileSystemTestCase {
     ensure.that(zipFile).fileExtists();
     File javaFile = zipFile.toJavaFile();
     ZipFileSystem zipFileSystem = new ZipFileSystem(javaFile);
-    registerToClose(zipFileSystem);
+    registerResource(zipFileSystem);
     TFileFactory zipFileFactory = new TFileFactory(zipFileSystem);
     TDirectory root = zipFileFactory.dir(&quot;/&quot;);
     ensure.that(root.exists()).eq(true);
@@ -257,7 +256,7 @@ public class TDirectoryTest extends PhysicalFileSystemTestCase {
     directory.zipTo(zipFile);
     File javaFile = zipFile.toJavaFile();
     ZipFileSystem zipFileSystem = new ZipFileSystem(javaFile);
-    registerToClose(zipFileSystem);
+    registerResource(zipFileSystem);
     TFileFactory zipFileFactory = new TFileFactory(zipFileSystem);
     TDirectory root = zipFileFactory.dir(&quot;/&quot;);
     TFile[] actualList = root.listFiles();
@@ -273,7 +272,7 @@ public class TDirectoryTest extends PhysicalFileSystemTestCase {
     TFile zipFile = directory.parent().file(&quot;zip.zip&quot;);
     directory.zipTo(zipFile);
     ZipFileSystem zipFileSystem = new ZipFileSystem(zipFile.toJavaFile());
-    registerToClose(zipFileSystem);
+    registerResource(zipFileSystem);
     TFileFactory zipFileFactory = new TFileFactory(zipFileSystem);
     TDirectory root = zipFileFactory.dir(&quot;/&quot;);
     ensure.that(root.listFiles().length).eq(0);
@@ -288,7 +287,7 @@ public class TDirectoryTest extends PhysicalFileSystemTestCase {
     TFile zip = directory.parent().file(&quot;result.zip&quot;);
     directory.zipTo(zip);
     ZipFileSystem zipFileSystem = new ZipFileSystem(zip.toJavaFile());
-    registerToClose(zipFileSystem);
+    registerResource(zipFileSystem);
     TFileFactory zipTFileFactory = new TFileFactory(zipFileSystem);
     TDirectory root = zipTFileFactory.dir(&quot;/&quot;);
     ensure.that(root.dir(&quot;subdir&quot;).listDirs()).isEmpty();</diff>
      <filename>core/behaviour/src/net/sf/cotta/TDirectoryTest.java</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,11 @@ import net.sf.cotta.test.TestCase;
 public class TEntryTest extends TestCase {
   public void testAccessToFactory() {
     TFileFactory factory = new TFileFactory();
-    TEntry entry = new TEntry(factory, TPath.parse(&quot;/path&quot;));
+    TEntry entry = new TEntry(factory, TPath.parse(&quot;/path&quot;)) {
+      public boolean exists() throws TIoException {
+        return false;
+      }
+    };
     ensure.that(entry.factory()).sameAs(factory);
   }
 }</diff>
      <filename>core/behaviour/src/net/sf/cotta/TEntryTest.java</filename>
    </modified>
    <modified>
      <diff>@@ -50,7 +50,7 @@ public class TFileFactoryTest extends PhysicalFileSystemTestCase {
     ensure.that(TFileFactory.canConvertUrl(url)).eq(true);
   }
 
-  public void testLoadTFileFromResourceUrl() {
+  public void testLoadTFileFromResourceUrl() throws TIoException {
     //Given
     URL url = getClass().getResource(&quot;/&quot; + String.class.getName().replace('.', '/') + &quot;.class&quot;);
     //When</diff>
      <filename>core/behaviour/src/net/sf/cotta/TFileFactoryTest.java</filename>
    </modified>
    <modified>
      <diff>@@ -169,7 +169,7 @@ public abstract class TfsTestCase extends CottaTestCase {
     TFile file = factory.file(&quot;tmp/test.txt&quot;);
     file.save(&quot;&quot;);
     InputStream stream = file.io().inputStream();
-    registerToClose(stream);
+    registerResource(stream);
     ensureEquals(stream.read(), -1);
   }
 
@@ -177,7 +177,7 @@ public abstract class TfsTestCase extends CottaTestCase {
     TFileFactory factory = new TFileFactory(fileSystem());
     TFile file = factory.file(&quot;tmp/test.txt&quot;);
     OutputStream stream = file.io().outputStream(OutputMode.OVERWRITE);
-    registerToClose(stream);
+    registerResource(stream);
     stream.write(&quot;this is a line&quot;.getBytes());
     stream.close();
     ensure.that(file.parent().exists()).eq(true);
@@ -209,11 +209,11 @@ public abstract class TfsTestCase extends CottaTestCase {
     TFileFactory factory = new TFileFactory(fileSystem());
     TFile file = factory.file(&quot;tmp/test.txt&quot;);
     Writer writer = file.io().writer(OutputMode.APPEND);
-    registerToClose(writer);
+    registerResource(writer);
     writer.write(&quot;line\n&quot;);
     writer.close();
     Reader reader = file.io().reader();
-    registerToClose(reader);
+    registerResource(reader);
     ensure.character(reader.read()).eq('l');
   }
 
@@ -221,11 +221,11 @@ public abstract class TfsTestCase extends CottaTestCase {
     TFileFactory factory = new TFileFactory(fileSystem());
     TFile file = factory.file(&quot;tmp/test.txt&quot;);
     Writer writer = file.io().writer(OutputMode.APPEND);
-    registerToClose(writer);
+    registerResource(writer);
     writer.write(&quot;one&quot;);
     writer.close();
     Writer anotherWriter = file.io().writer(OutputMode.APPEND);
-    registerToClose(anotherWriter);
+    registerResource(anotherWriter);
     anotherWriter.write(&quot;two&quot;);
     anotherWriter.close();
     ensure.that(file.load()).eq(&quot;onetwo&quot;);</diff>
      <filename>core/behaviour/src/net/sf/cotta/acceptance/TfsTestCase.java</filename>
    </modified>
    <modified>
      <diff>@@ -189,7 +189,7 @@ public class InMemoryFileSystemTest extends CottaTestCase {
     fileSystem.createDir(path.parent());
     fileSystem.createFile(path);
     InputStream is = fileSystem.createInputStream(path);
-    registerToClose(is);
+    registerResource(is);
     ensureEquals(is.read(), -1);
   }
 
@@ -197,7 +197,7 @@ public class InMemoryFileSystemTest extends CottaTestCase {
     TPath path = TPath.parse(&quot;/tmp/input.txt&quot;);
     try {
       InputStream is = fileSystem.createInputStream(path);
-      registerToClose(is);
+      registerResource(is);
       fail(&quot;FileNotFoundException should have been thrown&quot;);
     } catch (TFileNotFoundException e) {
       ensure.that(e).message().contains(path.toPathString());
@@ -218,7 +218,7 @@ public class InMemoryFileSystemTest extends CottaTestCase {
 
   private void writeContent(TPath path, OutputMode mode, String content) throws IOException {
     OutputStream os = fileSystem.createOutputStream(path, mode);
-    registerToClose(os);
+    registerResource(os);
     os.write(content.getBytes());
     os.close();
   }
@@ -243,11 +243,11 @@ public class InMemoryFileSystemTest extends CottaTestCase {
     TPath path = TPath.parse(&quot;/tmp/filetoappend.txt&quot;);
     fileSystem.createDir(path.parent());
     OutputStream os1 = fileSystem.createOutputStream(path, OutputMode.APPEND);
-    registerToClose(os1);
+    registerResource(os1);
     os1.write(&quot;one&quot;.getBytes());
     os1.close();
     OutputStream os2 = fileSystem.createOutputStream(path, OutputMode.APPEND);
-    registerToClose(os2);
+    registerResource(os2);
     os2.write(&quot;two&quot;.getBytes());
     os2.close();
     ensure.that(loadContent(fileSystem, path)).eq(&quot;onetwo&quot;);</diff>
      <filename>core/behaviour/src/net/sf/cotta/memory/InMemoryFileSystemTest.java</filename>
    </modified>
    <modified>
      <diff>@@ -4,21 +4,20 @@ import net.sf.cotta.CottaTestCase;
 import net.sf.cotta.TFile;
 import net.sf.cotta.TFileFactory;
 import net.sf.cotta.TIoException;
+import net.sf.cotta.test.TestCase;
 
 import java.nio.ByteBuffer;
 import java.nio.channels.FileChannel;
 
-public class InMemoryInputFileChannelTest extends CottaTestCase {
+public class InMemoryInputFileChannelTest extends TestCase {
   private InMemoryFileSystem fileSystem;
 
   public void beforeMethod() throws Exception {
-    super.beforeMethod();
     fileSystem = new InMemoryFileSystem();
   }
 
   public void afterMethod() throws TIoException {
     fileSystem = null;
-    super.afterMethod();
   }
 
   public void testReadByte() throws Exception {</diff>
      <filename>core/behaviour/src/net/sf/cotta/memory/InMemoryInputFileChannelTest.java</filename>
    </modified>
    <modified>
      <diff>@@ -49,7 +49,7 @@ public class PhysicalFileSystemTest extends PhysicalFileSystemTestCase {
   public void testCreateParentDirectoryWhenCreatingOutputStream() throws Exception {
     TPath fileToCreate = TPath.parse(&quot;tmp/ttt.txt&quot;);
     OutputStream os = fileSystem.createOutputStream(fileToCreate, OutputMode.APPEND);
-    registerToClose(os);
+    registerResource(os);
     os.write(&quot;test&quot;.getBytes());
     os.close();
     ensure.that(fileSystem.fileExists(fileToCreate));</diff>
      <filename>core/behaviour/src/net/sf/cotta/physical/PhysicalFileSystemTest.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 package net.sf.cotta.test.assertion;
 
 import net.sf.cotta.TDirectory;
+import net.sf.cotta.TIoException;
 import org.hamcrest.BaseMatcher;
 import org.hamcrest.Description;
 
@@ -12,7 +13,11 @@ public class TDirectoryAssert extends BaseAssert&lt;TDirectory, TDirectoryAssert&gt; {
   public TDirectoryAssert exists() {
     matches(new BaseMatcher&lt;TDirectory&gt;() {
       public boolean matches(Object o) {
-        return ((TDirectory) o).exists();
+        try {
+          return ((TDirectory) o).exists();
+        } catch (TIoException e) {
+          throw new RuntimeException(e.getMessage(), e);
+        }
       }
 
       public void describeTo(Description description) {</diff>
      <filename>core/behaviour/src/net/sf/cotta/test/assertion/TDirectoryAssert.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 package net.sf.cotta.test.assertion;
 
 import net.sf.cotta.TFile;
+import net.sf.cotta.TIoException;
 import org.hamcrest.BaseMatcher;
 import org.hamcrest.Description;
 
@@ -12,7 +13,11 @@ public class TFileAssert extends BaseAssert&lt;TFile, TFileAssert&gt; {
   public TFileAssert fileExtists() {
     matches(new BaseMatcher&lt;TFile&gt;() {
       public boolean matches(Object item) {
-        return ((TFile) item).exists();
+        try {
+          return ((TFile) item).exists();
+        } catch (TIoException e) {
+          throw new RuntimeException(e.getMessage(), e);
+        }
       }
 
       public void describeTo(Description description) {</diff>
      <filename>core/behaviour/src/net/sf/cotta/test/assertion/TFileAssert.java</filename>
    </modified>
    <modified>
      <diff>@@ -39,7 +39,7 @@ public class ZipFileSystemTest extends CottaTestCase {
     final ClassPathEntry pathEntry = classPathEntryLocator.locateEntry();
     // &quot;This test only works if behaviour class is not in a jar&quot;
     ensure.that(pathEntry.type()).eq(ClassPathType.DIRECTORY);
-    registerToClose(new Closeable() {
+    registerResource(new Closeable() {
       public void close() throws TIoException {
         pathEntry.closeResource();
       }
@@ -161,7 +161,7 @@ public class ZipFileSystemTest extends CottaTestCase {
   }
 
   private void registerToClose(final ZipFileSystem zipFileSystem) {
-    registerToClose(new Closeable() {
+    registerResource(new Closeable() {
       public void close() throws TIoException {
         zipFileSystem.close();
       }</diff>
      <filename>core/behaviour/src/net/sf/cotta/zip/ZipFileSystemTest.java</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,8 @@ public class ControlledFileSystem implements FileSystem {
     this.fileSystem = fileSystem;
   }
 
-  public boolean fileExists(TPath path) {
+  public boolean fileExists(TPath path) throws TIoException {
+    controller.readOperationControl(path);
     return fileSystem.fileExists(path);
   }
 
@@ -35,7 +36,8 @@ public class ControlledFileSystem implements FileSystem {
     fileSystem.deleteFile(path);
   }
 
-  public boolean dirExists(TPath path) {
+  public boolean dirExists(TPath path) throws TIoException {
+    controller.readOperationControl(path);
     return fileSystem.dirExists(path);
   }
 
@@ -93,11 +95,13 @@ public class ControlledFileSystem implements FileSystem {
     return fileSystem.pathString(path);
   }
 
-  public long fileLength(TPath path) {
+  public long fileLength(TPath path) throws TIoException {
+    controller.readOperationControl(path);
     return fileSystem.fileLength(path);
   }
 
-  public long fileLastModified(TPath path) {
+  public long fileLastModified(TPath path) throws TIoException {
+    controller.readOperationControl(path);
     return fileSystem.fileLastModified(path);
   }
 </diff>
      <filename>core/src/net/sf/cotta/ControlledFileSystem.java</filename>
    </modified>
    <modified>
      <diff>@@ -11,13 +11,13 @@ import java.nio.channels.FileChannel;
  * @noinspection JavaDoc
  */
 public interface FileSystem {
-  boolean fileExists(TPath path);
+  boolean fileExists(TPath path) throws TIoException;
 
   void createFile(TPath path) throws TIoException;
 
   void deleteFile(TPath path) throws TIoException;
 
-  boolean dirExists(TPath path);
+  boolean dirExists(TPath path) throws TIoException;
 
   void createDir(TPath path) throws TIoException;
 
@@ -39,7 +39,7 @@ public interface FileSystem {
 
   String pathString(TPath path);
 
-  long fileLength(TPath path);
+  long fileLength(TPath path) throws TIoException;
 
   File toJavaFile(TPath path);
 
@@ -47,5 +47,5 @@ public interface FileSystem {
 
   FileChannel createInputChannel(TPath path) throws TIoException;
 
-  long fileLastModified(TPath path);
+  long fileLastModified(TPath path) throws TIoException;
 }</diff>
      <filename>core/src/net/sf/cotta/FileSystem.java</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,7 @@ public class TDirectory extends TEntry {
     super(factory, path);
   }
 
-  public boolean exists() {
+  public boolean exists() throws TIoException {
     return filesystem().dirExists(path);
   }
 
@@ -113,7 +113,7 @@ public class TDirectory extends TEntry {
     return directories.toArray(new TDirectory[directories.size()]);
   }
 
-  private void checkDirectoryExists() throws TDirectoryNotFoundException {
+  private void checkDirectoryExists() throws TIoException {
     if (!filesystem().dirExists(path)) {
       throw new TDirectoryNotFoundException(path);
     }</diff>
      <filename>core/src/net/sf/cotta/TDirectory.java</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ import java.io.File;
 /**
  * Entry instance that represents either a file or a directory.
  */
-public class TEntry {
+abstract public class TEntry {
   protected TPath path;
   private TFileFactory factory;
 
@@ -78,4 +78,6 @@ public class TEntry {
   public String path() {
     return filesystem().pathString(path);
   }
+
+  public abstract boolean exists() throws TIoException;
 }</diff>
      <filename>core/src/net/sf/cotta/TEntry.java</filename>
    </modified>
    <modified>
      <diff>@@ -55,7 +55,7 @@ public class TFile extends TEntry {
     super(factory, path);
   }
 
-  public boolean exists() {
+  public boolean exists() throws TIoException {
     return filesystem().fileExists(path);
   }
 
@@ -155,11 +155,11 @@ public class TFile extends TEntry {
     }
   }
 
-  public long length() {
+  public long length() throws TIoException {
     return filesystem().fileLength(path);
   }
 
-  public long lastModified() {
+  public long lastModified() throws TIoException {
     return filesystem().fileLastModified(path);
   }
 </diff>
      <filename>core/src/net/sf/cotta/TFile.java</filename>
    </modified>
    <modified>
      <diff>@@ -35,11 +35,12 @@ cotta_testbase_source_zip.move_to(cotta_testbase_release_source)
 
 pscp = BuildMaster::PscpDriver.new(&quot;wolfdancer,cotta@web.sourceforge.net&quot;)
 builds_dir = '/home/groups/c/co/cotta/htdocs/builds'
+report_dir = '/home/groups/c/co/cotta/htdocs/report'
 pscp.copy(cotta_core_release_jar.path, &quot;#{builds_dir}/#{cotta_core_release_jar.name}&quot;)
 pscp.copy(cotta_core_release_source.path, &quot;#{builds_dir}/#{cotta_core_release_source.name}&quot;)
 pscp.copy(cotta_testbase_release_jar, &quot;#{builds_dir}/#{cotta_testbase_release_jar.name}&quot;)
 pscp.copy(cotta_core_release_source, &quot;#{builds_dir}/#{cotta_core_release_source.name}&quot;)
-
+pscp.copy(dir.dir('build/report', &quot;#{report_dir}&quot;)
 puts &lt;&lt;TODO
 staging jar and source zip
 staging Java Doc</diff>
      <filename>release.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,14 +3,12 @@
 	&lt;classpathentry kind=&quot;src&quot; path=&quot;src&quot;/&gt;
 	&lt;classpathentry kind=&quot;src&quot; path=&quot;test&quot;/&gt;
 	&lt;classpathentry kind=&quot;con&quot; path=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_16&quot;/&gt;
-	&lt;classpathentry exported=&quot;true&quot; kind=&quot;lib&quot; path=&quot;D:/Work/cotta/lib/junit/junit-4.4.jar&quot; sourcepath=&quot;D:/Work/cotta/lib/junit/src/junit-4.4-src.jar&quot;/&gt;
 	&lt;classpathentry exported=&quot;true&quot; kind=&quot;lib&quot; path=&quot;D:/Work/cotta/lib/jmock/objenesis-1.0.jar&quot;/&gt;
 	&lt;classpathentry exported=&quot;true&quot; kind=&quot;lib&quot; path=&quot;D:/Work/cotta/lib/jmock/cglib-nodep-2.1_3.jar&quot; sourcepath=&quot;D:/Work/cotta/lib/jmock/cglib-2.1_3-src.jar&quot;/&gt;
-	&lt;classpathentry exported=&quot;true&quot; kind=&quot;lib&quot; path=&quot;D:/Work/cotta/lib/jmock/hamcrest-core-1.1.jar&quot;/&gt;
-	&lt;classpathentry exported=&quot;true&quot; kind=&quot;lib&quot; path=&quot;D:/Work/cotta/lib/jmock/hamcrest-library-1.1.jar&quot;/&gt;
 	&lt;classpathentry exported=&quot;true&quot; kind=&quot;lib&quot; path=&quot;D:/Work/cotta/lib/jmock/jmock-2.4.0.jar&quot;/&gt;
 	&lt;classpathentry exported=&quot;true&quot; kind=&quot;lib&quot; path=&quot;D:/Work/cotta/lib/jmock/jmock-junit3-2.4.0.jar&quot;/&gt;
 	&lt;classpathentry exported=&quot;true&quot; kind=&quot;lib&quot; path=&quot;D:/Work/cotta/lib/jmock/jmock-junit4-2.4.0.jar&quot;/&gt;
 	&lt;classpathentry exported=&quot;true&quot; kind=&quot;lib&quot; path=&quot;D:/Work/cotta/lib/jmock/jmock-legacy-2.4.0.jar&quot;/&gt;
+	&lt;classpathentry combineaccessrules=&quot;false&quot; exported=&quot;true&quot; kind=&quot;src&quot; path=&quot;/cotta-asserts&quot;/&gt;
 	&lt;classpathentry kind=&quot;output&quot; path=&quot;bin&quot;/&gt;
 &lt;/classpath&gt;</diff>
      <filename>testbase/.classpath</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,13 @@ package net.sf.cotta.test;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
+import java.io.Closeable;
+import java.util.ArrayList;
+import java.util.List;
 
 abstract public class TestCase extends junit.framework.TestCase {
+  private List&lt;Closeable&gt; resourcesToClose;
+
   public TestCase() {
     loadFixtures();
   }
@@ -26,11 +31,25 @@ abstract public class TestCase extends junit.framework.TestCase {
     try {
       reallyRunBare(repository);
     } finally {
+      closeResources();
       repository.fixtureTearDown(this);
       resetsFieldsToSaveMemoryForLargeTestSuite();
     }
   }
 
+  private void closeResources() {
+    if (resourcesToClose == null) {
+      return;
+    }
+    for (Closeable aResourcesToClose : resourcesToClose) {
+      try {
+        (aResourcesToClose).close();
+      } catch (Exception e) {
+        // ignore exception
+      }
+    }
+  }
+
   private void resetsFieldsToSaveMemoryForLargeTestSuite() {
     Class&lt;?&gt; aClass = getClass();
     for (Class&lt;?&gt; testClass = aClass; !testClass.equals(TestCase.class); testClass = testClass.getSuperclass()) {
@@ -80,6 +99,17 @@ abstract public class TestCase extends junit.framework.TestCase {
   }
 
   /**
+   * Register resources to be closed when test is finished, all exceptions will be ignored
+   * @param resource resource to close
+   */
+  protected void registerResource(Closeable resource) {
+    if (resourcesToClose == null) {
+      resourcesToClose = new ArrayList&lt;Closeable&gt;(3);
+    }
+    resourcesToClose.add(resource);
+  }
+
+  /**
    * @throws Exception
    * @deprecated call beforeMethod instead
    */
@@ -97,9 +127,17 @@ abstract public class TestCase extends junit.framework.TestCase {
     throw new UnsupportedOperationException(&quot;you should call super.afterMethod() instead.  Otherwise super.afterMethod() might be skipped&quot;);
   }
 
+  /**
+   * Method to be called before the test method.  You don't need to call this empty implementation
+   * @throws Exception exception
+   */
   public void beforeMethod() throws Exception {
   }
 
+  /**
+   * Method to be called after the test method.  You don't need to call this empty implemenation from subclass
+   * @throws Exception exception
+   */
   public void afterMethod() throws Exception {
   }
 </diff>
      <filename>testbase/src/net/sf/cotta/test/TestCase.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>39d2bcef13dbbdefd37c9b39706ac5b89899ea74</id>
    </parent>
  </parents>
  <author>
    <name>wolfdancer</name>
    <email>wolfdancer@gmail.com</email>
  </author>
  <url>http://github.com/wolfdancer/cotta/commit/126f44a945acf79d75e37389e2680a80bfed4249</url>
  <id>126f44a945acf79d75e37389e2680a80bfed4249</id>
  <committed-date>2009-04-22T22:18:07-07:00</committed-date>
  <authored-date>2009-04-22T22:18:07-07:00</authored-date>
  <message>fixed the gap on file system controlled, the read operation should throw TIoException</message>
  <tree>a148605152733d13e357a5956fa443d9a998dc5f</tree>
  <committer>
    <name>wolfdancer</name>
    <email>wolfdancer@gmail.com</email>
  </committer>
</commit>
