Added tests
Synced from master
Synced from master