public void setLanguage(String language) {
        if(language == null) {
          // TODO: Log a message?
          // But how to find the name of the offending GUI element in the case of a TestBean?
          super.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_NONE);
        } else {
          final String style = languageProperties.getProperty(language);
          if (style == null) {
              super.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_NONE);
          } else {
              super.setSyntaxEditingStyle(style);
          }
        }
    }
@Test
    public void testSetLanguage() {
        try {
            @SuppressWarnings("deprecation") // test code
            JSyntaxTextArea textArea = new JSyntaxTextArea(30, 50, false);
            textArea.setLanguage(null);
            assertEquals(SyntaxConstants.SYNTAX_STYLE_NONE, textArea.getSyntaxEditingStyle());
        } catch (HeadlessException he) {
            // Does not work in headless mode, which depends on value of java.awt.headless property
            // and the OS (e.g. might work on MacOS and not on Linux due to missing X11).
            System.out.println("WARNING for JSyntaxTextAreaTest.testSetLanguage test: does not work in headless mode");
        }
    }