### Question:
PluginClass { public void validate() { if (name == null) { throw new IllegalArgumentException("Plugin class name cannot be null."); } if (className == null) { throw new IllegalArgumentException("Plugin class className cannot be null."); } if (type == null) { throw new IllegalArgumentException("Plugin class type cannot be null"); } if (description == null) { throw new IllegalArgumentException("Plugin class description cannot be null"); } if (properties == null) { throw new IllegalArgumentException("Plugin class properties cannot be null"); } if (requirements == null) { throw new IllegalArgumentException("Plugin class requirements cannot be null"); } } PluginClass();  PluginClass(String type, String name, String description, String className,
                     @Nullable String configfieldName, Map<String, PluginPropertyField> properties,
                     Requirements requirements);  PluginClass(String type, String name, String description, String className, @Nullable String configfieldName,
                     Map<String, PluginPropertyField> properties); void validate(); String getType(); String getName(); String getDescription(); String getClassName(); @Nullable String getConfigFieldName(); Map<String, PluginPropertyField> getProperties(); Requirements getRequirements(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testValidate() { PluginClass invalidPluginClass = new PluginClass(); String pluginClassJSON = GSON.toJson(invalidPluginClass); try { PluginClass pluginClass = GSON.fromJson(pluginClassJSON, PluginClass.class); pluginClass.validate(); Assert.fail("Should have failed to convert an invalid json"); } catch (IllegalArgumentException e) { } }