@Test
public void testLeadershipChangeEventLogging() {

    ClusterMembershipRevision<ClusterMemberLeadership> revision = ClusterMembershipRevision.<ClusterMemberLeadership>newBuilder()
            .withCurrent(ClusterMemberLeadership.newBuilder()
                    .withMemberId("local")
                    .withLeadershipState(ClusterMemberLeadershipState.Leader)
                    .build()
            )
            .build();
    String value = ClusterMembershipTransactionLogger.doFormat(ClusterMembershipEvent.leaderElected(revision));
    assertThat(value).isEqualTo("eventType=[leadership] memberId=local active=n/a   registered=n/a   enabled=n/a  memberRevision=n/a      leadershipState=Leader     leadershipRevision=0");
}