CategorizedString extends CategorizedLegend<String> { @Override public String getFromLower(Double d){ if(d==null){ throw new NullPointerException("The input threshold must not be null"); } if(parameter instanceof StringLiteral){ return ((StringLiteral) parameter).getValue(null); } else { String col = get(d); if(col == null){ Categorize2String c2s = (Categorize2String) parameter; Map<String,Object> inp = new HashMap<>(); inp.put(getField(), d); return c2s.getValue(inp); } else { return col; } } } CategorizedString(StringParameter sp); @Override SeParameter getParameter(); void setParameter(StringParameter param); String getFallbackValue(); void setFallbackValue(String value); @Override String get(Double d); @Override void put(Double d, String v); @Override String remove(Double d); @Override String getFromLower(Double d);  }
@Test public void testGetFromLower() throws Exception { CategorizedString cs = new CategorizedString(getCategorize2String()); assertTrue(cs.getFromLower(25.0).equals("Greater")); }