[bug 1045982] Added API tests.