### Question:
FlyweightVectorSchema { public void set(String name, Value value, Value[] values) { Integer index = keys.get(name); if (index == null) { throw new IllegalArgumentException("Schema contains no key with name \"" + name + "\"."); } values[index] = value; } FlyweightVectorSchema(String... keys);  FlyweightVectorSchema(FeatureInformation featureInformation);  FlyweightVectorSchema(Collection<String> keys); Value get(String name, Value[] values); void set(String name, Value value, Value[] values); int size(); Set<String> keys(); Iterator<VectorEntry<String, Value>> iterator(final Value[] values); FlyweightVectorBuilder builder();  }### Answer:
@Test public void testSettingViaFlyweightVectorSchema() { schema.set("a", VALUE1, values); schema.set("b", VALUE2, values); schema.set("c", VALUE3, values); assertArrayEquals(new Value[] { VALUE1, VALUE2, VALUE3, null }, values); }
@Test(expected = IllegalArgumentException.class) public void testSettingInvalidKeyShouldTriggerException() { schema.set("z", VALUE1, values); }