ExtractElementDataModifier extends AbstractDataModifierJob<String> { @Override public void setParameters(Map<String, String> params) throws ParametersException { elementId = params.get(PARAM_ELEMENT_ID); elementClass = params.get(PARAM_ELEMENT_CLASS); validateParameters(); }  @Override void setParameters(Map<String, String> params); @Override String modifyData(String data); @Override String getInfo(); static final String NAME; static final String PARAM_ELEMENT_ID; static final String PARAM_ELEMENT_CLASS; }
@Test(expected = ParametersException.class) public void setParameters_whenElementIdAndClassAreDefined_throwException() throws ParametersException { Map<String, String> parametersMap = new HashMap<String, String>(); parametersMap.put(ExtractElementDataModifier.PARAM_ELEMENT_ID, "some_element_id"); parametersMap.put(ExtractElementDataModifier.PARAM_ELEMENT_CLASS, "some_class"); extractElementDataModifier.setParameters(parametersMap); }
@Test(expected = ParametersException.class) public void setParameters_whenNoneAttributeIsDefined_throwException() throws ParametersException { Map<String, String> parametersMap = new HashMap<String, String>(); extractElementDataModifier.setParameters(parametersMap); }