Directory mockDirectory = (Directory)mockDirectoryControl.getMock();
mockFileSystemControl.expectAndReturn(mockFileSystem.getDirectory("/attachments/project/0"),
mockDirectory);
mockFileSystem.createFile(mockDirectory, "testFile.txt", "text/plain",
6, new ByteArrayInputStream(new byte[1]));
mockFileSystemControl.setMatcher(new ArgumentsMatcher() {
public boolean matches(Object[] expected, Object[] actual) {
assertSame(expected[0], actual[0]);
assertEquals(expected[1], actual[1]);
assertEquals(expected[2], actual[2]);
assertEquals(expected[3], actual[3]);