The FileSystemContractBaseTest.mkdirs() asserts that a newly created directory is true, but way of FileStatus.isFile(), but doesn't assert that the directory is a dir by way of FileStatus.isDir().
The assertion used is slightly weaker, as the isFile() test is actually
!isdir && !isSymlink(). if an implementation of FileSystem.mkdirs() created symlinks then the test would still pass.
There is one test that looks at the isDirectory() logic, testMkdirsWithUmask() -but as that test is skipped for the s3 filesystems, it is possible for those filesystems (or similar) to not have their directory creation logic stressed enough.
The fix would be a trivial single line.