@@ -29,6 +29,7 @@ public class TopicIdTest {
2929 private static final String PROJECT = "project" ;
3030 private static final String NAME = "topic" ;
3131 private static final String TOPIC_PB = "projects/project/topics/topic" ;
32+ private static final String DELETED_TOPIC_NAME = "_deleted-topic_" ;
3233
3334 @ Test
3435 public void testOf () {
@@ -45,7 +46,7 @@ public void testOf() {
4546 public void testDeletedTopic () {
4647 TopicId deletedTopic = TopicId .deletedTopic ();
4748 assertNull (deletedTopic .project ());
48- assertEquals ("_deleted_topic_" , deletedTopic .topic ());
49+ assertEquals (DELETED_TOPIC_NAME , deletedTopic .topic ());
4950 assertTrue (deletedTopic .isDeleted ());
5051 assertSame (deletedTopic , TopicId .deletedTopic ());
5152 }
@@ -60,6 +61,7 @@ public void testToAndFromPb() {
6061 topicPb = topicId .toPb ("otherProject" );
6162 assertEquals ("projects/otherProject/topics/topic" , topicPb );
6263 compareTopicId (TopicId .of ("otherProject" , NAME ), TopicId .fromPb (topicPb ));
64+ assertSame (TopicId .deletedTopic (), TopicId .fromPb (DELETED_TOPIC_NAME ));
6365 }
6466
6567 private void compareTopicId (TopicId expected , TopicId value ) {
0 commit comments