Refactored test

Signed-off-by: Bebe Peng <b.peng@awesometown.local>