### Question:
ScriptDropAdderImpl implements ScriptDropAdder { @Override public void commit() { queue.addOnCclCloseCommand(new DropScriptCommand(scriptName)); } ScriptDropAdderImpl(final String scriptName, final CommandQueue queue); @Override void commit();  }### Answer:
@Test public void testCommit() throws Exception { final DropScriptCommand command = mock(DropScriptCommand.class); whenNew(DropScriptCommand.class).withArguments(scriptName).thenReturn(command); adder.commit(); verify(queue).addOnCclCloseCommand(command); }