### Question:
LocalVarPackageFVG implements LocalVarFeatureValueGenerator { @Override public String getFeatureValue(LocalVariable data) { int index = data.getType().lastIndexOf(LocalVariable.PACKAGE_DELIMITER); if (index > 0) { return data.getType().substring(0, index); } return data.getType(); }  @Override void init(Config config); @Override String getFeatureValue(LocalVariable data);  }### Answer:
@Test public void testFeatureValueGenerator() throws Exception { LocalVarFeatureValueGenerator generator = new LocalVarPackageFVG(); LocalVariable basic = new LocalVariable("hello", "B", null); LocalVariable composite = new LocalVariable("hello1", "Lcom/my/Clazz", null); LocalVariable composite2 = new LocalVariable("hello2", "Lcom/my/package/is/large/ThisIsASpecialClass", null); assertEquals("B", generator.getFeatureValue(basic)); assertEquals("Lcom/my", generator.getFeatureValue(composite)); assertEquals("Lcom/my/package/is/large", generator.getFeatureValue(composite2)); }