@Test
public void testErrorMessageWhensecureClientPortNotSetButsecureClientPortAddressSet()
        throws IOException, ConfigException {

    QuorumPeerConfig quorumPeerConfig = new QuorumPeerConfig();
    try {
        Properties zkProp = getDefaultZKProperties();
        zkProp.setProperty("secureClientPortAddress", "localhost");
        quorumPeerConfig.parseProperties(zkProp);
        fail("IllegalArgumentException is expected");
    } catch (IllegalArgumentException e) {
        String expectedMessage = "secureClientPortAddress is set but secureClientPort is not set";
        assertEquals(expectedMessage, e.getMessage());
    }
}