C3POAdaptor implements AdaptorPluginInterface { @Override public void setParameterValues(final Map<String, String> values) throws InvalidParameterException { final Set<String> keys = values.keySet(); for (ConfigParameter cp : this.defaultConfig) { final String key = cp.getKey(); if (cp.isRequired() && (!keys.contains(key) || values.get(key) == null)) { throw new InvalidParameterException( "No value set for the required config parameter: " + key); } } this.config = values; }  @Override void init(); @Override void shutdown(); @Override String getName(); @Override String getVersion(); @Override String getDescription(); @Override PluginType getPluginType(); @Override List<ConfigParameter> getParameters(); @Override Map<String, String> getParameterValues(); @Override void setParameterValues(final Map<String, String> values); @Override boolean hasNext(); @Override ResultInterface next(); @Override @Deprecated ResultInterface execute(); @Override @Deprecated ResultInterface execute(final Map<Entity, List<Property>> context);  }
@Test(expected = InvalidParameterException.class) public void onParameterValuesSetupFailure1() throws Exception { final Map<String, String> values = new HashMap<String, String>(); this.adaptor.setParameterValues(values); Assert.fail("This code should not have been reached."); }