Instance { @Builder @GoalName("entry") <K, V extends S> Map.Entry<K, V> entry(K key, V value) { return new AbstractMap.SimpleEntry(key, String.valueOf(prefix) + value); } Instance(S prefix);   }
@Test public void entry() throws Exception { Instance<String> instance = new Instance<>(""); Map.Entry<Integer, String> entry = InstanceBuilders.entryBuilder(instance) .key(1) .value("y"); assertThat(entry.getKey(), is(1)); assertThat(entry.getValue(), is("y")); }