Dependencies implements IAnalyzer { public Dependencies() { for(String tag: DEPENDENCIES) { Attribute attribute = new Attribute(tag); attributes.add(attribute); } } Dependencies(); @Override Object analyze(String q); ArrayList<Attribute> getAttributes(); @Override Attribute getAttribute(); ArrayList<String> getTags();  }
@SuppressWarnings("unchecked") @Test public void dependenciesTest() { Dependencies dep = new Dependencies(); Map<String,Integer> dependencies = (Map<String, Integer>) dep.analyze("What is the capital of Germany?"); int[] actuals = new int[dependencies.keySet().size()]; List<String> keyList = new ArrayList<String>(dependencies.keySet()); for(int i = 0; i<keyList.size(); i++) { actuals[i] = dependencies.get(keyList.get(i)); } int[] expecteds = {1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1}; assertArrayEquals(actuals,expecteds); }