### Question:
ActivityClient { public void clearPreparedStatementPreparations() { httpDelete(preparedStatementPreparationUrl, "Clearing of prepared statement preparations failed"); } private  ActivityClient(String host, int port, int socketTimeout); static ActivityClientBuilder builder(); List<Query> retrieveQueries(); List<Connection> retrieveConnections(); void clearConnections(); void clearQueries(); void clearPreparedStatementPreparations(); List<PreparedStatementPreparation> retrievePreparedStatementPreparations(); void clearPreparedStatementExecutions(); void clearAllRecordedActivity(); List<PreparedStatementExecution> retrievePreparedStatementExecutions(); List<BatchExecution> retrieveBatches(); void clearBatchExecutions();  }### Answer:
@Test public void testDeletingOfPreparationsHistory() { stubFor(delete(urlEqualTo(preparedStatementPreparationUrl)) .willReturn(aResponse().withStatus(200))); underTest.clearPreparedStatementPreparations(); verify(deleteRequestedFor(urlEqualTo(preparedStatementPreparationUrl))); }
@Test(expected = ActivityRequestFailed.class) public void testDeletingOfPreparationsHistoryFailure() { stubFor(delete(urlEqualTo(preparedStatementPreparationUrl)) .willReturn(aResponse().withStatus(200).withFault(Fault.RANDOM_DATA_THEN_CLOSE))); underTest.clearPreparedStatementPreparations(); }