Fix unit test
Add unit test for invalid thumbnail mode