Rewrite unit test

Change-Id: I667901b76f9322f4ddf628bc1a8c78063a040171