added unit tests for REST interface