@Test
public void testUnsupportedFileOperationAnnotations() throws Exception {

    List<FileOperation> supportedOps = Arrays.asList(getSupportedOperations());
    Class<? extends AbstractFile> fileClass = tempFile.getClass();
    Method m;
    for(FileOperation op: FileOperation.values()) {
        m = op.getCorrespondingMethod(fileClass);
        assert supportedOps.contains(op) ==
            !fileClass.getMethod(m.getName(), m.getParameterTypes()).isAnnotationPresent(UnsupportedFileOperation.class)
                :"File operation "+op+" does not match annotation of method "+m.getName();
    }
}