	@Test
	public void testRelease()
			throws Exception {

		// Given
		FileHandleFiller filler = mock(FileHandleFiller.class);
		ArgumentCaptor<Integer> handleCaptor = ArgumentCaptor.forClass(Integer.class);
		doNothing().when(filler).setFileHandle(handleCaptor.capture());
		Path fooBar = mockPath(mirrorRoot, "foo.bar");
		when(fileSystem.provider().newFileChannel(eq(fooBar), eq(set(StandardOpenOption.READ)))).thenReturn(mock(FileChannel.class));
		fs.open("foo.bar", filler);
		// When
		int result = fs.release("foo.bar", handleCaptor.getValue());
		// Then
		assertThat(result).isEqualTo(SUCCESS);
	}