diff --git a/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java b/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
index 1e5d879..0d371d8 100644
--- a/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
+++ b/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
@@ -148,7 +148,9 @@
     public void testSetPhoneCallDetails_MultipleCallTypeIconsLastOneDropped() {
         setPhoneCallDetailsWithCallTypeIcons(Calls.MISSED_TYPE, Calls.MISSED_TYPE,
                 Calls.INCOMING_TYPE, Calls.OUTGOING_TYPE);
-        assertCallTypeIconsEquals(Calls.MISSED_TYPE, Calls.MISSED_TYPE, Calls.INCOMING_TYPE);
+        assertCallTypeIconsEqualsPlusOverflow(
+            getContext().getString(R.string.call_log_item_count, 4),
+            Calls.MISSED_TYPE, Calls.MISSED_TYPE, Calls.INCOMING_TYPE);
     }
 
     public void testSetPhoneCallDetails_CallTypeText() {
@@ -234,6 +236,22 @@
         assertEquals(View.GONE, mViews.callTypeSeparator.getVisibility());
     }
 
+    /**
+     * Asserts that the call type contains the images with the given drawables and shows the given
+     * text next to the icons.
+     */
+    private void assertCallTypeIconsEqualsPlusOverflow(String overflowText, int... ids) {
+        assertEquals(ids.length, mViews.callTypeIcons.getCount());
+        for (int index = 0; index < ids.length; ++index) {
+            int id = ids[index];
+            assertEquals(id, mViews.callTypeIcons.getCallType(index));
+        }
+        assertEquals(View.VISIBLE, mViews.callTypeIcons.getVisibility());
+        assertEquals(View.VISIBLE, mViews.callTypeText.getVisibility());
+        assertEquals(overflowText, mViews.callTypeText.getText().toString());
+        assertEquals(View.VISIBLE, mViews.callTypeSeparator.getVisibility());
+    }
+
     /** Asserts that the call type contains the given text. */
     private void assertCallTypeTextEquals(String text) {
         assertEquals(text, mViews.callTypeText.getText().toString());
