### Question:
QuorumBean implements QuorumMXBean, ZKMBeanInfo { @Override public String getName() { return name; } QuorumBean(QuorumPeer peer); @Override String getName(); @Override boolean isHidden(); @Override int getQuorumSize(); int getSyncLimit(); int getInitLimit(); void setInitLimit(int initLimit); void setSyncLimit(int syncLimit); @Override boolean isSslQuorum(); @Override boolean isPortUnification(); @Override long getObserverElectionDelayMS(); @Override void setObserverElectionDelayMS(long delayMS); @Override boolean getDigestEnabled(); @Override void disableDigest();  }### Answer:
@Test public void testGetNameProperty() { QuorumPeer qpMock = mock(QuorumPeer.class); when(qpMock.getId()).thenReturn(1L); QuorumBean qb = new QuorumBean(qpMock); assertThat("getName property should return Bean name in the right format", qb.getName(), equalTo("ReplicatedServer_id1")); }