### Question:
JdbcResourceManipulator extends ResourceManipulator { @Override public void cleanupSource(ProcessScript<?> script) throws IOException { if (script == null) { throw new IllegalArgumentException("script must not be null"); } JdbcScript<?> jdbc = createOppositeJdbcScript(script, DriverScript.Kind.SOURCE); truncate(jdbc); } JdbcResourceManipulator(JdbcProfile profile, ParameterList arguments); @Override String getName(); @Override void cleanupSource(ProcessScript<?> script); @Override void cleanupDrain(ProcessScript<?> script); @Override SourceDriver<T> createSourceForSource(ProcessScript<T> script); @Override DrainDriver<T> createDrainForSource(ProcessScript<T> script); @Override SourceDriver<T> createSourceForDrain(ProcessScript<T> script); @Override DrainDriver<T> createDrainForDrain(ProcessScript<T> script);  }### Answer:
@Test public void cleanupSource() throws Exception { Map<String, String> conf = new HashMap<>(); conf.put(JdbcProcess.TABLE.key(), "PAIR"); conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE"); conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName()); ProcessScript<Pair> process = process(new DriverScript("jdbc", conf), dummy()); h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')"); h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')"); h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')"); JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList()); assertThat(h2.count("PAIR"), is(3)); manipulator.cleanupSource(process); assertThat(h2.count("PAIR"), is(0)); }