@SuppressWarnings("unchecked")
@Test
public void infoWhenAnotherIsLeader() {

	given(this.mockLeadershipController.getLocalLeader()).willReturn(Optional.of(this.mockLeader));
	given(this.mockLeader.getRole()).willReturn("testRole");
	given(this.mockLeader.getId()).willReturn("id");
	Info.Builder builder = new Info.Builder();
	leaderInfoContributor.contribute(builder);
	Map<String, Object> details = (Map<String, Object>) builder.build().get("leaderElection");
	assertThat(details).containsEntry("isLeader", false);
	assertThat(details).containsEntry("leaderId", "id");
	assertThat(details).containsEntry("role", "testRole");
}