### Question:
DynamicDriveToolTipTagFragmentGenerator implements ToolTipTagFragmentGenerator { @Override public String generateToolTipFragment(String toolTipText) { return " onMouseOver=\"return stm(['" + ImageMapUtilities.javascriptEscape(this.title) + "','" + ImageMapUtilities.javascriptEscape(toolTipText) + "'],Style[" + this.style + "]);\"" + " onMouseOut=\"return htm();\""; } DynamicDriveToolTipTagFragmentGenerator();  DynamicDriveToolTipTagFragmentGenerator(String title, int style); @Override String generateToolTipFragment(String toolTipText);  }### Answer:
@Test public void testGenerateURLFragment() { OverLIBToolTipTagFragmentGenerator g = new OverLIBToolTipTagFragmentGenerator(); assertEquals(" onMouseOver=\"return overlib('abc');\"" + " onMouseOut=\"return nd();\"", g.generateToolTipFragment("abc")); assertEquals(" onMouseOver=\"return overlib(" + "'It\\'s \\\"A\\\", 100.0');\" onMouseOut=\"return nd();\"", g.generateToolTipFragment("It\'s \"A\", 100.0")); }