@@ -0,0 +1,1411 @@
+package com.vrg.rapid;%0A%0Aimport com.google.common.collect.ImmutableList;%0Aimport com.vrg.rapid.pb.Endpoint;%0Aimport com.vrg.rapid.pb.Phase1bMessage;%0Aimport com.vrg.rapid.pb.Rank;%0Aimport org.junit.Test;%0A%0Aimport java.io.IOException;%0Aimport java.util.List;%0A%0Aimport static junit.framework.Assert.assertTrue;%0A%0A/**%0A * Tests for loggable wrapper around protobuf objects%0A */%0Apublic class LoggableTests %7B%0A    @Test%0A    public void testToString() throws IOException, InterruptedException %7B%0A        final String logString = (%22%22 + Utils.loggable(getMessage()));%0A        assertTrue(!logString.contains(%22%5Cn%22));%0A    %7D%0A%0A    @Test%0A    public void testCollectionToString() throws IOException, InterruptedException %7B%0A        final List%3CPhase1bMessage%3E messages = ImmutableList.of(getMessage(), getMessage());%0A        final String logString = (%22%22 + Utils.loggable(messages));%0A        assertTrue(!logString.contains(%22%5Cn%22));%0A    %7D%0A%0A    private Phase1bMessage getMessage() %7B%0A        final Rank rank = Rank.newBuilder().setRound(1).setNodeIndex(2).build();%0A        final List%3CEndpoint%3E endpoints =%0A                ImmutableList.of(Endpoint.newBuilder().setHostname(%22127.0.0.1%22).setPort(50).build(),%0A                        Endpoint.newBuilder().setHostname(%22127.0.0.2%22).setPort(51).build());%0A        return Phase1bMessage.newBuilder()%0A                .setRnd(rank)%0A                .addAllVval(endpoints)%0A                .build();%0A    %7D%0A%7D%0A

Test case for logging utilities