Added image sampling tests

This is the testing part of #73.