completed write of tests (from selfhost to mocked)