Hid test-only functions from surface/call.h
diff --git a/BUILD b/BUILD
index 3e2a45b..ffeb31e 100644
--- a/BUILD
+++ b/BUILD
@@ -223,6 +223,7 @@
     "src/core/surface/api_trace.h",
     "src/core/surface/byte_buffer_queue.h",
     "src/core/surface/call.h",
+    "src/core/surface/call_test_only.h",
     "src/core/surface/channel.h",
     "src/core/surface/completion_queue.h",
     "src/core/surface/event_string.h",
@@ -509,6 +510,7 @@
     "src/core/surface/api_trace.h",
     "src/core/surface/byte_buffer_queue.h",
     "src/core/surface/call.h",
+    "src/core/surface/call_test_only.h",
     "src/core/surface/channel.h",
     "src/core/surface/completion_queue.h",
     "src/core/surface/event_string.h",
@@ -1296,6 +1298,7 @@
     "src/core/surface/api_trace.h",
     "src/core/surface/byte_buffer_queue.h",
     "src/core/surface/call.h",
+    "src/core/surface/call_test_only.h",
     "src/core/surface/channel.h",
     "src/core/surface/completion_queue.h",
     "src/core/surface/event_string.h",
diff --git a/build.yaml b/build.yaml
index 98fb034..e277b60 100644
--- a/build.yaml
+++ b/build.yaml
@@ -183,6 +183,7 @@
   - src/core/surface/api_trace.h
   - src/core/surface/byte_buffer_queue.h
   - src/core/surface/call.h
+  - src/core/surface/call_test_only.h
   - src/core/surface/channel.h
   - src/core/surface/completion_queue.h
   - src/core/surface/event_string.h
diff --git a/gRPC.podspec b/gRPC.podspec
index 717e700..6378cf0 100644
--- a/gRPC.podspec
+++ b/gRPC.podspec
@@ -227,6 +227,7 @@
                       'src/core/surface/api_trace.h',
                       'src/core/surface/byte_buffer_queue.h',
                       'src/core/surface/call.h',
+                      'src/core/surface/call_test_only.h',
                       'src/core/surface/channel.h',
                       'src/core/surface/completion_queue.h',
                       'src/core/surface/event_string.h',
@@ -518,6 +519,7 @@
                               'src/core/surface/api_trace.h',
                               'src/core/surface/byte_buffer_queue.h',
                               'src/core/surface/call.h',
+                              'src/core/surface/call_test_only.h',
                               'src/core/surface/channel.h',
                               'src/core/surface/completion_queue.h',
                               'src/core/surface/event_string.h',
diff --git a/src/core/surface/call.c b/src/core/surface/call.c
index c8b880b..630be2f 100644
--- a/src/core/surface/call.c
+++ b/src/core/surface/call.c
@@ -521,7 +521,7 @@
   call->compression_algorithm = algo;
 }
 
-grpc_compression_algorithm grpc_call_get_compression_algorithm(
+grpc_compression_algorithm grpc_call_test_only_get_compression_algorithm(
     grpc_call *call) {
   grpc_compression_algorithm algorithm;
   gpr_mu_lock(&call->mu);
@@ -561,11 +561,15 @@
   }
 }
 
-gpr_uint32 grpc_call_get_encodings_accepted_by_peer(grpc_call *call) {
-  return call->encodings_accepted_by_peer;
+gpr_uint32 grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call *call) {
+  gpr_uint32 encodings_accepted_by_peer;
+  gpr_mu_lock(&call->mu);
+  encodings_accepted_by_peer = call->encodings_accepted_by_peer;
+  gpr_mu_unlock(&call->mu);
+  return encodings_accepted_by_peer;
 }
 
-gpr_uint32 grpc_call_get_message_flags(grpc_call *call) {
+gpr_uint32 grpc_call_test_only_get_message_flags(grpc_call *call) {
   gpr_uint32 flags;
   gpr_mu_lock(&call->mu);
   flags = call->incoming_message_flags;
diff --git a/src/core/surface/call.h b/src/core/surface/call.h
index cd1db3d..9b7c6f9 100644
--- a/src/core/surface/call.h
+++ b/src/core/surface/call.h
@@ -169,16 +169,6 @@
 
 gpr_uint8 grpc_call_is_client(grpc_call *call);
 
-grpc_compression_algorithm grpc_call_get_compression_algorithm(grpc_call *call);
-
-gpr_uint32 grpc_call_get_message_flags(grpc_call *call);
-
-/** Returns a bitset for the encodings (compression algorithms) supported by \a
- * call's peer.
- *
- * To be indexed by grpc_compression_algorithm enum values. */
-gpr_uint32 grpc_call_get_encodings_accepted_by_peer(grpc_call *call);
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/core/surface/call_test_only.h b/src/core/surface/call_test_only.h
new file mode 100644
index 0000000..df4be32
--- /dev/null
+++ b/src/core/surface/call_test_only.h
@@ -0,0 +1,65 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef GRPC_INTERNAL_CORE_SURFACE_CALL_TEST_ONLY_H
+#define GRPC_INTERNAL_CORE_SURFACE_CALL_TEST_ONLY_H
+
+#include <grpc/grpc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Return the compression algorithm from \a call.
+ *
+ * \warning This function should \b only be used in test code. */
+grpc_compression_algorithm grpc_call_test_only_get_compression_algorithm(
+    grpc_call *call);
+
+/** Return the message flags from \a call.
+ *
+ * \warning This function should \b only be used in test code. */
+gpr_uint32 grpc_call_test_only_get_message_flags(grpc_call *call);
+
+/** Returns a bitset for the encodings (compression algorithms) supported by \a
+ * call's peer.
+ *
+ * To be indexed by grpc_compression_algorithm enum values. */
+gpr_uint32 grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call *call);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_INTERNAL_CORE_SURFACE_CALL_TEST_ONLY_H */
diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c
index a4614a2..f321fe1 100644
--- a/test/core/end2end/tests/compressed_payload.c
+++ b/test/core/end2end/tests/compressed_payload.c
@@ -46,7 +46,7 @@
 #include "test/core/end2end/cq_verifier.h"
 #include "src/core/channel/channel_args.h"
 #include "src/core/channel/compress_filter.h"
-#include "src/core/surface/call.h"
+#include "src/core/surface/call_test_only.h"
 
 enum { TIMEOUT = 200000 };
 
@@ -196,12 +196,13 @@
   cq_expect_completion(cqv, tag(101), 1);
   cq_verify(cqv);
 
-  GPR_ASSERT(GPR_BITCOUNT(grpc_call_get_encodings_accepted_by_peer(s)) == 3);
-  GPR_ASSERT(GPR_BITGET(grpc_call_get_encodings_accepted_by_peer(s),
+  GPR_ASSERT(
+      GPR_BITCOUNT(grpc_call_test_only_get_encodings_accepted_by_peer(s)) == 3);
+  GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
                         GRPC_COMPRESS_NONE) != 0);
-  GPR_ASSERT(GPR_BITGET(grpc_call_get_encodings_accepted_by_peer(s),
+  GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
                         GRPC_COMPRESS_DEFLATE) != 0);
-  GPR_ASSERT(GPR_BITGET(grpc_call_get_encodings_accepted_by_peer(s),
+  GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
                         GRPC_COMPRESS_GZIP) != 0);
 
   op = ops;
diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h
index 0221df9..ace1930 100644
--- a/test/cpp/interop/client_helper.h
+++ b/test/cpp/interop/client_helper.h
@@ -38,7 +38,7 @@
 
 #include <grpc++/channel.h>
 
-#include "src/core/surface/call.h"
+#include "src/core/surface/call_test_only.h"
 
 namespace grpc {
 namespace testing {
@@ -57,11 +57,11 @@
 
   // Inspector methods, able to peek inside ClientContext, follow.
   grpc_compression_algorithm GetCallCompressionAlgorithm() const {
-    return grpc_call_get_compression_algorithm(context_.call_);
+    return grpc_call_test_only_get_compression_algorithm(context_.call_);
   }
 
   gpr_uint32 GetMessageFlags() const {
-    return grpc_call_get_message_flags(context_.call_);
+    return grpc_call_test_only_get_message_flags(context_.call_);
   }
 
  private:
diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc
index 4570750..5138a38 100644
--- a/test/cpp/interop/server_helper.cc
+++ b/test/cpp/interop/server_helper.cc
@@ -38,7 +38,7 @@
 #include <gflags/gflags.h>
 #include <grpc++/security/server_credentials.h>
 
-#include "src/core/surface/call.h"
+#include "src/core/surface/call_test_only.h"
 #include "test/core/end2end/data/ssl_test_data.h"
 
 DECLARE_bool(use_tls);
@@ -65,11 +65,11 @@
 
 grpc_compression_algorithm
 InteropServerContextInspector::GetCallCompressionAlgorithm() const {
-  return grpc_call_get_compression_algorithm(context_.call_);
+  return grpc_call_test_only_get_compression_algorithm(context_.call_);
 }
 
 gpr_uint32 InteropServerContextInspector::GetEncodingsAcceptedByClient() const {
-  return grpc_call_get_encodings_accepted_by_peer(context_.call_);
+  return grpc_call_test_only_get_encodings_accepted_by_peer(context_.call_);
 }
 
 std::shared_ptr<const AuthContext>
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 5658a10..5fd3ee7 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -858,6 +858,7 @@
 src/core/surface/api_trace.h \
 src/core/surface/byte_buffer_queue.h \
 src/core/surface/call.h \
+src/core/surface/call_test_only.h \
 src/core/surface/channel.h \
 src/core/surface/completion_queue.h \
 src/core/surface/event_string.h \
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 1ceff15..76d66ed 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -12365,6 +12365,7 @@
       "src/core/surface/api_trace.h", 
       "src/core/surface/byte_buffer_queue.h", 
       "src/core/surface/call.h", 
+      "src/core/surface/call_test_only.h", 
       "src/core/surface/channel.h", 
       "src/core/surface/completion_queue.h", 
       "src/core/surface/event_string.h", 
@@ -12607,6 +12608,7 @@
       "src/core/surface/call.h", 
       "src/core/surface/call_details.c", 
       "src/core/surface/call_log_batch.c", 
+      "src/core/surface/call_test_only.h", 
       "src/core/surface/channel.c", 
       "src/core/surface/channel.h", 
       "src/core/surface/channel_connectivity.c", 
@@ -12861,6 +12863,7 @@
       "src/core/surface/api_trace.h", 
       "src/core/surface/byte_buffer_queue.h", 
       "src/core/surface/call.h", 
+      "src/core/surface/call_test_only.h", 
       "src/core/surface/channel.h", 
       "src/core/surface/completion_queue.h", 
       "src/core/surface/event_string.h", 
@@ -13073,6 +13076,7 @@
       "src/core/surface/call.h", 
       "src/core/surface/call_details.c", 
       "src/core/surface/call_log_batch.c", 
+      "src/core/surface/call_test_only.h", 
       "src/core/surface/channel.c", 
       "src/core/surface/channel.h", 
       "src/core/surface/channel_connectivity.c", 
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj
index 183edbc..88b883f 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj
@@ -344,6 +344,7 @@
     <ClInclude Include="..\..\..\src\core\surface\api_trace.h" />
     <ClInclude Include="..\..\..\src\core\surface\byte_buffer_queue.h" />
     <ClInclude Include="..\..\..\src\core\surface\call.h" />
+    <ClInclude Include="..\..\..\src\core\surface\call_test_only.h" />
     <ClInclude Include="..\..\..\src\core\surface\channel.h" />
     <ClInclude Include="..\..\..\src\core\surface\completion_queue.h" />
     <ClInclude Include="..\..\..\src\core\surface\event_string.h" />
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
index 66ce9ca..1a46ac8 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
@@ -743,6 +743,9 @@
     <ClInclude Include="..\..\..\src\core\surface\call.h">
       <Filter>src\core\surface</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\..\src\core\surface\call_test_only.h">
+      <Filter>src\core\surface</Filter>
+    </ClInclude>
     <ClInclude Include="..\..\..\src\core\surface\channel.h">
       <Filter>src\core\surface</Filter>
     </ClInclude>
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
index b527179..cddd003 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
@@ -323,6 +323,7 @@
     <ClInclude Include="..\..\..\src\core\surface\api_trace.h" />
     <ClInclude Include="..\..\..\src\core\surface\byte_buffer_queue.h" />
     <ClInclude Include="..\..\..\src\core\surface\call.h" />
+    <ClInclude Include="..\..\..\src\core\surface\call_test_only.h" />
     <ClInclude Include="..\..\..\src\core\surface\channel.h" />
     <ClInclude Include="..\..\..\src\core\surface\completion_queue.h" />
     <ClInclude Include="..\..\..\src\core\surface\event_string.h" />
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
index 7be3c9e..01e0d8d 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -641,6 +641,9 @@
     <ClInclude Include="..\..\..\src\core\surface\call.h">
       <Filter>src\core\surface</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\..\src\core\surface\call_test_only.h">
+      <Filter>src\core\surface</Filter>
+    </ClInclude>
     <ClInclude Include="..\..\..\src\core\surface\channel.h">
       <Filter>src\core\surface</Filter>
     </ClInclude>