Han: fix a null pointer issue of robolectric