Simplify code in mock filedepot