### Question:
TemplatedPayloadGenerator implements PayloadGenerator, Configurable { @Override public void setOffsets(Map<String, Object> offsets) { valueProvider.setParameters(offsets); populateValues(); }  @Override void configure(Map<String, ?> props); @Override boolean update(Request request, Response response); @Override String getRequestBody(); @Override Map<String, String> getRequestParameters(); @Override Map<String, String> getRequestHeaders(); @Override Map<String, Object> getOffsets(); @Override void setOffsets(Map<String, Object> offsets);  }### Answer:
@Test public void testSetOffsets() { generator.configure(CONFIG_PROPS); generator.setOffsets(Collections.singletonMap("STAR_NAME", "Pollux")); assertThat(generator.getOffsets(), hasEntry("STAR_NAME", "Pollux")); assertThat(generator.getRequestBody(), Matchers.equalTo("{\"query\": \"select * from known_stars where name='Pollux'\"")); }