FluentWebDriver.BooleanResultsAdapter bwa = new FluentWebDriver.BooleanResultsAdapter(wd, m, c);
int count = 0;
Method[] methods = FluentWebDriver.BooleanResultsAdapter.class.getDeclaredMethods();
when(wd.findElement(byID)).thenThrow(new NoSuchElementException("boo"));
for (Method method : methods) {
String name = method.getName();
if (method.getReturnType().equals(Boolean.TYPE) && !name.equals("returnBool")) {
if (method.getParameterTypes().length == 0) {
when(wd.findElement(tagName(name.replace("link","a")))).thenThrow(new NoSuchElementException("boo"));
assertFalse((Boolean) method.invoke(bwa));
} else {
assertFalse((Boolean) method.invoke(bwa, byID));
}
count++;