### Question:
VariableDeclaration { @Override public String toString() { String tagsString = ""; if (!Strings.isNullOrEmpty(tags)) { tagsString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagsString; } else { return typedIdentifier.getName() + ":" + type + tagsString; } } VariableDeclaration(String identifier, String type);  VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIdentifier(); void setIdentifier(String identifier); String getType(); void setType(String type); ItemDefinition getTypeDeclaration(); Property getTypedIdentifier(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testToString() { assertEquals(tested.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE + ":" + CONSTRUCTOR_TAGS); assertNotEquals(tested.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE + ":" + "[myCustomTag]"); VariableDeclaration comparable = new VariableDeclaration(CONSTRUCTOR_IDENTIFIER, CONSTRUCTOR_TYPE, null); assertEquals(comparable.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE); comparable = new VariableDeclaration(CONSTRUCTOR_IDENTIFIER, CONSTRUCTOR_TYPE, ""); assertEquals(comparable.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE); }