make api test code more readable

Change-Id: Ia49ec13329d4fc05b47c0772f28466c6e4b4155c
Build unittests for nodes api

1. test create node
2. test delete node

Change-Id: I9e4e2b5dbb992bed12ec07db0a55614b9d045d31
Merge "make api test code more readable"