@Test public void testToString() { Map<String,String> exportedVars = null; Import imp = new Import( "/root/node", "comp1", exportedVars ); Assert.assertNotNull( imp.toString()); exportedVars = new HashMap<String,String> (); imp = new Import( "/root/node", "comp1", exportedVars ); Assert.assertNotNull( imp.toString()); exportedVars.put( "comp.ip", "127.0.0.1" ); exportedVars.put( "comp.data", null ); imp = new Import( "/root/node", "comp1", exportedVars ); Assert.assertNotNull( imp.toString()); imp = new Import( new Instance( "my VM" )); Assert.assertEquals( "/my VM", imp.getInstancePath()); }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( this.instancePath ); sb.append( " exports [ " ); for( Iterator<Map.Entry<String,String>> it = this.exportedVars.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String,String> entry = it.next(); sb.append( entry.getKey()); sb.append( "=" ); sb.append( entry.getValue()); if( it.hasNext()) sb.append( ", " ); } sb.append(" ] "); return sb.toString(); }
Import implements Serializable { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( this.instancePath ); sb.append( " exports [ " ); for( Iterator<Map.Entry<String,String>> it = this.exportedVars.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String,String> entry = it.next(); sb.append( entry.getKey()); sb.append( "=" ); sb.append( entry.getValue()); if( it.hasNext()) sb.append( ", " ); } sb.append(" ] "); return sb.toString(); } }
Import implements Serializable { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( this.instancePath ); sb.append( " exports [ " ); for( Iterator<Map.Entry<String,String>> it = this.exportedVars.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String,String> entry = it.next(); sb.append( entry.getKey()); sb.append( "=" ); sb.append( entry.getValue()); if( it.hasNext()) sb.append( ", " ); } sb.append(" ] "); return sb.toString(); } Import( Instance instance );  Import( String instancePath, String componentName );  Import( String instancePath, String componentName, Map<String,String> exportedVars ); }
Import implements Serializable { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( this.instancePath ); sb.append( " exports [ " ); for( Iterator<Map.Entry<String,String>> it = this.exportedVars.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String,String> entry = it.next(); sb.append( entry.getKey()); sb.append( "=" ); sb.append( entry.getValue()); if( it.hasNext()) sb.append( ", " ); } sb.append(" ] "); return sb.toString(); } Import( Instance instance );  Import( String instancePath, String componentName );  Import( String instancePath, String componentName, Map<String,String> exportedVars ); Map<String,String> getExportedVars(); String getInstancePath(); String getComponentName(); @Override boolean equals( Object obj ); @Override int hashCode(); @Override String toString(); }
Import implements Serializable { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( this.instancePath ); sb.append( " exports [ " ); for( Iterator<Map.Entry<String,String>> it = this.exportedVars.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String,String> entry = it.next(); sb.append( entry.getKey()); sb.append( "=" ); sb.append( entry.getValue()); if( it.hasNext()) sb.append( ", " ); } sb.append(" ] "); return sb.toString(); } Import( Instance instance );  Import( String instancePath, String componentName );  Import( String instancePath, String componentName, Map<String,String> exportedVars ); Map<String,String> getExportedVars(); String getInstancePath(); String getComponentName(); @Override boolean equals( Object obj ); @Override int hashCode(); @Override String toString();  }