### Question:
MetaverseDocument extends PropertiesHolder implements IDocument { @Override public String getLogicalId() { if ( logicalIdGenerator == null ) { return getStringID(); } else if ( logicalId == null || isDirty() ) { logicalId = logicalIdGenerator.generateId( this ); } return logicalId == null ? getStringID() : logicalId; }  @Override String getExtension(); @Override void setExtension( String extension ); @Override String getMimeType(); @Override void setMimeType( String mimeType ); @Override Object getContent(); @Override void setContent( Object content ); @Override void setName( String name ); @Override void setType( String type ); @Override String getName(); @Override String getStringID(); @Override String getType(); @Override void setStringID( String id ); @Override void setNamespace( INamespace namespace ); @Override INamespace getNamespace(); @Override String getNamespaceId(); @Override INamespace getParentNamespace(); @Override INamespace getSiblingNamespace( String name, String type ); @Override IAnalysisContext getContext(); @Override void setContext( IAnalysisContext context ); @Override String getLogicalId(); @Override void setLogicalIdGenerator( ILogicalIdGenerator idGenerator );  }### Answer:
@Test public void testGetLogicalId() throws Exception { MetaverseDocument myNode = new MetaverseDocument(); myNode.setName( "testName" ); myNode.setType( "testType" ); myNode.setProperty( "zzz", "last" ); myNode.setProperty( DictionaryConst.PROPERTY_NAMESPACE, "" ); myNode.setStringID( "myId" ); assertEquals( "{\"name\":\"testName\",\"namespace\":\"\",\"type\":\"testType\"}", myNode.getLogicalId() ); ILogicalIdGenerator idGenerator = new MetaverseLogicalIdGenerator( "type", "zzz", "name" ); myNode.setLogicalIdGenerator( idGenerator ); assertEquals( "{\"name\":\"testName\",\"type\":\"testType\",\"zzz\":\"last\"}", myNode.getLogicalId() ); }