New APIs and tests

tests are using external mock server now