@@ -76,7 +76,7 @@ public void createManagedChannelServiceConfig_failsOnDuplicateMethod() {
7676
7777 IllegalArgumentException e = assertThrows (IllegalArgumentException .class ,
7878 () -> ManagedChannelServiceConfig .fromServiceConfig (serviceConfig , true , 3 , 4 , null ));
79- assertThat (e ).hasMessageThat ().contains ("Duplicate method" );
79+ assertThat (e ).hasMessageThat ().isEqualTo ("Duplicate method name service/ method" );
8080 }
8181
8282 @ Test
@@ -88,7 +88,7 @@ public void createManagedChannelServiceConfig_failsOnDuplicateService() {
8888
8989 IllegalArgumentException e = assertThrows (IllegalArgumentException .class ,
9090 () -> ManagedChannelServiceConfig .fromServiceConfig (serviceConfig , true , 3 , 4 , null ));
91- assertThat (e ).hasMessageThat ().contains ("Duplicate service" );
91+ assertThat (e ).hasMessageThat ().isEqualTo ("Duplicate service service" );
9292 }
9393
9494 @ Test
@@ -102,7 +102,7 @@ public void createManagedChannelServiceConfig_failsOnDuplicateServiceMultipleCon
102102
103103 IllegalArgumentException e = assertThrows (IllegalArgumentException .class ,
104104 () -> ManagedChannelServiceConfig .fromServiceConfig (serviceConfig , true , 3 , 4 , null ));
105- assertThat (e ).hasMessageThat ().contains ("Duplicate service" );
105+ assertThat (e ).hasMessageThat ().isEqualTo ("Duplicate service service" );
106106 }
107107
108108 @ Test
@@ -113,7 +113,7 @@ public void createManagedChannelServiceConfig_failsOnMethodNameWithEmptyServiceN
113113
114114 IllegalArgumentException e = assertThrows (IllegalArgumentException .class ,
115115 () -> ManagedChannelServiceConfig .fromServiceConfig (serviceConfig , true , 3 , 4 , null ));
116- assertThat (e ).hasMessageThat ().contains ("missing service name for method method1" );
116+ assertThat (e ).hasMessageThat ().isEqualTo ("missing service name for method method1" );
117117 }
118118
119119 @ Test
@@ -124,7 +124,7 @@ public void createManagedChannelServiceConfig_failsOnMethodNameWithoutServiceNam
124124
125125 IllegalArgumentException e = assertThrows (IllegalArgumentException .class ,
126126 () -> ManagedChannelServiceConfig .fromServiceConfig (serviceConfig , true , 3 , 4 , null ));
127- assertThat (e ).hasMessageThat ().contains ("missing service name for method method1" );
127+ assertThat (e ).hasMessageThat ().isEqualTo ("missing service name for method method1" );
128128 }
129129
130130 @ Test
@@ -135,7 +135,7 @@ public void createManagedChannelServiceConfig_failsOnMissingServiceName() {
135135
136136 IllegalArgumentException e = assertThrows (IllegalArgumentException .class ,
137137 () -> ManagedChannelServiceConfig .fromServiceConfig (serviceConfig , true , 3 , 4 , null ));
138- assertThat (e ).hasMessageThat ().contains ("missing service" );
138+ assertThat (e ).hasMessageThat ().isEqualTo ("missing service name for method method " );
139139 }
140140
141141 @ Test
0 commit comments