@Test
public void testDropKeyWhenKeysAreForeignKeys() throws Exception {

    when(connectionMock.prepareStatement(contains("DROP FOREIGN KEY"))).thenReturn(preparedStatementMock);
    Connection conn = connectionMock;
    String tableName = "tableName";
    String key = "key";
    boolean isForeignKey = true;
    dao.dropKey(conn, tableName, key, isForeignKey);
    verify(connectionMock, times(1)).prepareStatement(anyString());
    verify(preparedStatementMock, times(1)).executeUpdate();
    verify(preparedStatementMock, times(1)).close();
    verify(loggerMock, times(1)).debug(contains("successfully"));
}