SingleInputSemanticProperties implements SemanticProperties { @Override public FieldSet getForwardingTargetFields(int input, int sourceField) { if (input != 0) { throw new IndexOutOfBoundsException(); } return this.fieldMapping.containsKey(sourceField) ? this.fieldMapping.get(sourceField) : FieldSet.EMPTY_SET; } SingleInputSemanticProperties(); @Override FieldSet getForwardingTargetFields(int input, int sourceField); @Override int getForwardingSourceField(int input, int targetField); @Override FieldSet getReadFields(int input); void addForwardedField(int sourceField, int targetField); void addReadFields(FieldSet readFields); @Override String toString();  }
@Test(expected = IndexOutOfBoundsException.class) public void testAllForwardedSingleInputSemPropsInvalidIndex2() { SingleInputSemanticProperties sp = new SingleInputSemanticProperties.AllFieldsForwardedProperties(); sp.getForwardingTargetFields(1, 0); }