Added unit test(simulator) and fixed some bug

Add more testcase by modifying TestModels