checkState(currentState instanceof TorrentState, "currentState is not a TorrentState but a %s", currentState.getClass().getName());
checkState(previousState instanceof TorrentState, "previousState is not a TorrentState but a %s", currentState.getClass().getName());
TorrentState currentTorrentState = (TorrentState) currentState;
TorrentState previousTorrentState = (TorrentState) previousState;
checkState(currentState instanceof TorrentState, "currentState is not a TorrentState but a %s", currentState.getClass().getName());
checkState(previousState instanceof TorrentState, "previousState is not a TorrentState but a %s", currentState.getClass().getName());
TorrentState currentTorrentState = (TorrentState) currentState;
TorrentState previousTorrentState = (TorrentState) previousState;