porting lecture demo test case.