### Question:
ProcessingPartition implements Closeable { public boolean fail(long offset) { if (pendingOffsets.remove(offset) == null) { LOGGER.debug("Fail for record on topic partition [{}] with offset [{}] is invalid as that offset is not " + "pending. Not resetting consumer", topicPartition, offset); return false; } LOGGER.debug("Failing record for partition [{}] and offset [{}]", topicPartition, offset); if (offsetPosition > offset) { if (LOGGER.isDebugEnabled()) LOGGER.debug("Failed record with partition [{}] and offset [{}] has offset before our current offset " + "position [{}], resetting consumer", topicPartition, offset, offsetPosition); resetToCommitted(); records = Collections.<ConsumerRecord<K, V>> emptyList().iterator(); } if (!paused) { addResult(false); double failurePercent = (double) recentFailedResults / config.getFailSampleSize(); LOGGER.debug("Failed processing for partition [{}] at [{}%]", topicPartition, failurePercent * 100); if (failurePercent >= config.getFailThreshold()) { paused = true; pausedTillTime = System.currentTimeMillis() + config.getFailPauseTime(); if (LOGGER.isInfoEnabled()) { LOGGER.info("Failed processing [{}%] above threshold [{}%]. Pausing partition [{}] till [{}]", new Object[] { failurePercent * 100, config.getFailThreshold() * 100, topicPartition, new Date(pausedTillTime) }); } consumer.pause(Collections.singleton(topicPartition)); PAUSED_METER.mark(); PAUSED_PARTITIONS.inc(); } } return true; } ProcessingPartition(TopicPartition topicPartition, ProcessingConfig config, Consumer<K, V> consumer); boolean ack(long offset); boolean fail(long offset); void maybeUnpause(long currentTime); OffsetAndMetadata getCommittableOffset(); long getCommittableOffsetsSize(); void committedOffset(long committedOffset); void load(List<ConsumerRecord<K, V>> records); ConsumerRecord<K, V> nextRecord(); boolean hasNextRecord(); TopicPartition getTopicPartition(); @Override void close();  }### Answer:
@Test public void fail_notPending() { assertThat(partition.fail(1L), is(false)); verify(consumer, never()).seek(topicPartition, 0); verify(consumer, never()).pause(Collections.singleton(topicPartition)); }