File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
main/java/com/google/firebase/messaging
test/java/com/google/firebase/messaging Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public class TopicManagementResponse {
4141 .put ("NOT_FOUND" , "registration-token-not-registered" )
4242 .put ("INTERNAL" , "internal-error" )
4343 .put ("TOO_MANY_TOPICS" , "too-many-topics" )
44+ .put ("RESOURCE_EXHAUSTED" , "resource-exhausted" )
4445 .build ();
4546
4647 private final int successCount ;
Original file line number Diff line number Diff line change @@ -413,6 +413,17 @@ public void testTopicManagementResponseErrorToString() {
413413 assertEquals (expected , topicManagementResponse .getErrors ().toString ());
414414 }
415415
416+ @ Test
417+ public void testTopicManagementResponseErrorResourceExhausted () {
418+ GenericJson json = new GenericJson ().set ("error" , "RESOURCE_EXHAUSTED" );
419+ ImmutableList <GenericJson > jsonList = ImmutableList .of (json );
420+
421+ TopicManagementResponse topicManagementResponse = new TopicManagementResponse (jsonList );
422+
423+ String expected = "[Error{index=0, reason=resource-exhausted}]" ;
424+ assertEquals (expected , topicManagementResponse .getErrors ().toString ());
425+ }
426+
416427 private static InstanceIdClientImpl initInstanceIdClient (
417428 final MockLowLevelHttpResponse mockResponse ,
418429 final HttpResponseInterceptor interceptor ) {
You can’t perform that action at this time.
0 commit comments