added tests for BuildImage