@Test
public void testPopulatePlainTextPasswords()
    throws HmsException
{

    Map<String, Object[]> inventoryMap = new HashMap<String, Object[]>();
    LinkedHashMap<String, Object> nodeMap = new LinkedHashMap<String, Object>();
    nodeMap.put( "managementIp", "10.175.17.229" );
    nodeMap.put( "nodeID", "N0" );
    nodeMap.put( "managementUserPassword", "calvin" );
    nodeMap.put( "osPassword", "ca$hc0w" );
    Object[] nodesArr = new Object[1];
    nodesArr[0] = nodeMap;
    LinkedHashMap<String, Object> switchMap = new LinkedHashMap<String, Object>();
    switchMap.put( "switchId", "S0" );
    switchMap.put( "ipAddress", "10.28.197.242" );
    switchMap.put( "password", "root123" );
    switchMap.put( "role", "MANAGEMENT" );
    Object[] switchArr = new Object[1];
    switchArr[0] = switchMap;
    inventoryMap.put( Constants.HOSTS, nodesArr );
    inventoryMap.put( Constants.SWITCHES, switchArr );
    AggregatorUtil.populatePlainTextPasswords( inventoryMap );
    Object[] hostObjs = inventoryMap.get( Constants.HOSTS );
    Object[] switchObjs = inventoryMap.get( Constants.SWITCHES );
    ObjectMapper mapper = new ObjectMapper();
    ServerNode[] serverNodes = mapper.convertValue( hostObjs, new TypeReference<ServerNode[]>()
    {
    } );
    SwitchNode[] switchNodes = mapper.convertValue( switchObjs, new TypeReference<SwitchNode[]>()
    {
    } );
    assertEquals( serverNodes[0].getNodeID(), "N0" );
    assertEquals( serverNodes[0].getManagementIp(), "10.175.17.229" );
    assertEquals( serverNodes[0].getManagementUserPassword(), "calvin" );
    assertEquals( serverNodes[0].getOsPassword(), "ca$hc0w" );
    assertEquals( switchNodes[0].getSwitchId(), "S0" );
    assertEquals( switchNodes[0].getIpAddress(), "10.28.197.242" );
    assertEquals( switchNodes[0].getPassword(), "root123" );
}