### Question:
QuorumBean implements QuorumMXBean, ZKMBeanInfo { @Override public boolean isPortUnification() { return peer.shouldUsePortUnification(); } 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 testPortUnificationProperty() { QuorumPeer qpMock = mock(QuorumPeer.class); QuorumBean qb = new QuorumBean(qpMock); when(qpMock.shouldUsePortUnification()).thenReturn(true); assertThat("isPortUnification property should return value of peer.shouldUsePortUnification()", qb.isPortUnification(), equalTo(true)); when(qpMock.shouldUsePortUnification()).thenReturn(false); assertThat("isPortUnification property should return value of peer.shouldUsePortUnification()", qb.isPortUnification(), equalTo(false)); }