use of com.google.gerrit.server.comment.CommentContextKey in project gerrit by GerritCodeReview.
the class CommentContextSerializerTest method roundTripKey.
@Test
public void roundTripKey() {
Project.NameKey proj = Project.NameKey.parse("project");
Change.Id changeId = Change.Id.tryParse("1234").get();
CommentContextKey k = CommentContextKey.builder().project(proj).changeId(changeId).id("commentId").path("pathHash").patchset(1).contextPadding(3).build();
byte[] serialized = CommentContextKey.Serializer.INSTANCE.serialize(k);
assertThat(k).isEqualTo(CommentContextKey.Serializer.INSTANCE.deserialize(serialized));
}
Aggregations