Adding Tasks api test suite and fixed some wrong codes