Add unit test for preview

Change-Id: I8adeb3577e31580862368d85d9e8e15643d000b7
Merge "Add unit test for preview"