private static void initToolkit() {
try {
Field toolkitField = Toolkit.class.getDeclaredField("toolkit");
toolkitField.setAccessible(true);
toolkitField.set(null, new UISpecToolkit());
}
catch (Exception e) {
throw new RuntimeException("Unable to initialize toolkit for interception.", e);
}
}