HmsInventory { public boolean loadInventory( final String inventoryFile ) { if ( StringUtils.isBlank( inventoryFile ) ) { logger.warn( "In loadInventory, inventory file is either null or blank." ); return false; } if ( this.inventoryFile != null && StringUtils.equals( this.inventoryFile, inventoryFile ) ) { logger.warn( "In loadInventory, overwriting inventory loaded from '{}' with inventory from '{}'.", this.inventoryFile, inventoryFile ); } try { ObjectMapper objectMapper = new ObjectMapper(); nodeMap = objectMapper.readValue( new File( inventoryFile ), new TypeReference<ConcurrentHashMap<String, Object[]>>() { } ); this.inventoryFile = inventoryFile; return true; } catch ( IOException e ) { logger.error( "In loadInventory, error parsing inventory file '{}'.", inventoryFile ); return false; } } private  HmsInventory(); static HmsInventory getInstance(); boolean loadInventory( final String inventoryFile ); boolean saveInventory( final String inventoryFile, boolean backup ); boolean saveInventory( final String inventoryFile ); boolean saveInventory( final boolean backup ); boolean saveInventory(); List<ServerNode> getHosts(); List<SwitchNode> getSwitches(); String getInventoryFile(); ServerNode getServerNode( final String hostId ); SwitchNode getSwitchNode( final String switchId ); boolean addHost( ServerNode serverNode ); boolean removeHost( final String hostId ); boolean setHosts( List<ServerNode> hosts );  }
@Test public void testLoadInventory() { HmsInventory hmsInventory = HmsInventory.getInstance(); assertTrue( hmsInventory.loadInventory( props.getProperty( HMS_IB_INVENTORY_LOCATION_PROPERTY ) ) ); }