Unit tests for file and block