public static void assertApiEquals(URL expected, URL actual) throws IOException {
JavaDocBuilder builder = new JavaDocBuilder();
builder.addSource(new InputStreamReader(expected.openStream()), expected.toExternalForm());
builder.addSource(new InputStreamReader(actual.openStream()), actual.toExternalForm());
JavaSource expectedSource = builder.getSources()[0];
JavaSource actualsource = builder.getSources()[1];
assertApiEquals(expectedSource, actualsource);
}