### Question:
ObjectId { public ObjectId(LocalId localId) { this.objectId = localId; } ObjectId(LocalId localId);  ObjectId(GlobalId globalId);  ObjectId(String id); Object getObjectId(); void setObjectId(ObjectId objectId); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testObjectId() throws Exception { LocalId lid = new LocalId("195mg90a39v"); GlobalId gid = new GlobalId("example.com:195mg90a39v"); ObjectId o1 = new ObjectId(lid); assertTrue(o1 instanceof ObjectId); ObjectId o2 = new ObjectId(gid); assertTrue(o2 instanceof ObjectId); ObjectId o3 = new ObjectId("195mg90a39v"); assertTrue(o3 instanceof ObjectId); assertTrue(o3.getObjectId() instanceof LocalId); ObjectId o4 = new ObjectId("example.com:195mg90a39v"); assertTrue(o4 instanceof ObjectId); assertTrue(o4.getObjectId() instanceof GlobalId); }