MessagingContext implements Serializable { @Override public String toString() { StringBuilder sb = new StringBuilder( getTopicName()); if( this.applicationName != null && this.kind != RecipientKind.DM ) { sb.append( " @ " ); sb.append( this.applicationName ); } sb.append( " (" ); sb.append( this.kind ); sb.append( ")" ); return sb.toString().trim(); } MessagingContext( RecipientKind kind, String domain, String applicationName );  MessagingContext( RecipientKind kind, String domain, String topicName, String applicationName );  MessagingContext( RecipientKind kind, String domain, String componentOrFacetName, ThoseThat thoseThat, String applicationName ); RecipientKind getKind(); String getApplicationName(); String getComponentOrFacetName(); ThoseThat getAgentDirection(); String getDomain(); String getTopicName(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString(); static Collection<MessagingContext> forImportedVariables(
			String domain,
			String applicationName,
			Instance instance,
			ThoseThat thoseThat ); static List<MessagingContext> forExportedVariables(
			String domain,
			String applicationName,
			Instance instance,
			Map<String,String> externalExports,
			ThoseThat thoseThat );  }
@Test public void testToString() { MessagingContext ctx = new MessagingContext( RecipientKind.DM, "domain", null ); Assert.assertEquals( "(DM)", ctx.toString()); ctx = new MessagingContext( RecipientKind.DM, "domain", "whatever" ); Assert.assertEquals( "whatever (DM)", ctx.toString()); ctx = new MessagingContext( RecipientKind.INTER_APP, "domain", "whatever" ); Assert.assertEquals( "(INTER_APP)", ctx.toString()); ctx = new MessagingContext( RecipientKind.INTER_APP, "domain", null ); Assert.assertEquals( "(INTER_APP)", ctx.toString()); ctx = new MessagingContext( RecipientKind.INTER_APP, "domain", "facet", null, "whatever" ); Assert.assertEquals( "facet (INTER_APP)", ctx.toString()); ctx = new MessagingContext( RecipientKind.INTER_APP, "domain", "facet", ThoseThat.EXPORT, "whatever" ); Assert.assertEquals( "those.that.export.facet (INTER_APP)", ctx.toString()); ctx = new MessagingContext( RecipientKind.AGENTS, "domain", "whatever" ); Assert.assertEquals( "@ whatever (AGENTS)", ctx.toString()); ctx = new MessagingContext( RecipientKind.AGENTS, "domain", null ); Assert.assertEquals( "(AGENTS)", ctx.toString()); ctx = new MessagingContext( RecipientKind.AGENTS, "domain", "facet", null, "whatever" ); Assert.assertEquals( "facet @ whatever (AGENTS)", ctx.toString()); ctx = new MessagingContext( RecipientKind.AGENTS, "domain", "facet", ThoseThat.IMPORT, "whatever" ); Assert.assertEquals( "those.that.import.facet @ whatever (AGENTS)", ctx.toString()); }