added unit test cases for imaging and encoding