### Question:
DataDogIdentifier { @Override public String toString () { return addQuotesIfNecessary(key) + "=" + addQuotesIfNecessary(value); } private  DataDogIdentifier(); static DataDogIdentifier dataDogIdentifier(); @Override int hashCode(); @Override boolean equals(Object o); String getKey(); String getValue(); DataDogIdentifier withKey(String key); DataDogIdentifier withValue(String value); @Override String toString();  }### Answer:
@Test public void testToString () { identifier.withKey(key).withValue(value); assertEquals("akey=avalue", identifier.toString()); identifier.withValue(valueWithSpace); assertEquals("akey=\"a value\"", identifier.toString()); identifier.withValue(valueQuoted); assertEquals("akey=\"a value\"", identifier.toString()); }