@Test
public void testMaskPassword()
{

    ServerNode node = new ServerNode();
    node.setNodeID( "N1" );
    node.setIbIpAddress( "1.2.3.4" );
    node.setOsUserName( "root" );
    node.setOsPassword( "root123" );
    List<EthernetController> ethernetControllerLst = new ArrayList<EthernetController>();
    EthernetController ethernetController = new EthernetController();
    ethernetController.setComponent( ServerComponent.CPU );
    ComponentIdentifier componentIdentifier = new ComponentIdentifier();
    componentIdentifier.setDescription( "test" );
    ethernetController.setComponentIdentifier( componentIdentifier );
    ethernetControllerLst.add( ethernetController );
    node.setEthernetControllerList( ethernetControllerLst );
    ServerNode copy = (ServerNode) HmsGenericUtil.maskPassword( node );
    assertEquals( node.getNodeID(), "N1" );
    assertEquals( node.getNodeID(), copy.getNodeID() );
    assertEquals( node.getIbIpAddress(), "1.2.3.4" );
    assertEquals( node.getIbIpAddress(), copy.getIbIpAddress() );
    assertEquals( node.getOsUserName(), "root" );
    assertEquals( node.getOsUserName(), copy.getOsUserName() );
    assertEquals( node.getOsPassword(), "root123" );
    assertNotEquals( node.getOsPassword(), copy.getOsPassword() );
    assertEquals( copy.getOsPassword(), "****" );
    List<EthernetController> ethernetControllerListOriginal = node.getEthernetControllerList();
    List<EthernetController> ethernetControllerListCopy = copy.getEthernetControllerList();
    assertEquals( ethernetControllerListOriginal.get( 0 ).getComponent(), ServerComponent.CPU );
    assertEquals( ethernetControllerListOriginal.get( 0 ).getComponent(),
                  ethernetControllerListCopy.get( 0 ).getComponent() );
    assertEquals( ethernetControllerListOriginal.get( 0 ).getComponentIdentifier().getDescription(), "test" );
    assertEquals( ethernetControllerListOriginal.get( 0 ).getComponentIdentifier().getDescription(),
                  ethernetControllerListCopy.get( 0 ).getComponentIdentifier().getDescription() );
}