use storage module instead of storage legacy and fix test code