Replying to fredck:
This is quite a difficult thing to handle in JUnit, as the test code also needs to identify the browser with a code that is basically similar to the code used in FCKeditor.Java for the browser check.
The only possible automation would be testing the compatibility checks over a list of browser user agent strings, which means that the check code should be separated from the user agent string retrieval code.
That's exactly what I want to do! I don't want to check the agent string retrieval code.
My Compatibility class gets only one argument, the user agent string. And so it is possible to check this class over a list of browser agent strings, as you said. So we can ensure, that the compatibility check works as it expected for a list of user agent strings. And that would be very helpful!
Do you have some exemplary user agent strings, for negative and positive checks?
Otherwise I'll take some from http://www.zytrax.com/tech/web/browser_ids.htm.