@Test
public void failedItemIsNotStoredIfFailedItemIsNull() throws IOException {

    // given
    String fileName = createTempFile().getAbsolutePath();
    ChronicleMap<CharSequence, ItemSource> failedItems = createDefaultTestChronicleMap();
    ChronicleMapRetryFailoverPolicy.Builder builder =
            createDefaultTestFailoverPolicyBuilder(fileName, failedItems);
    ChronicleMapRetryFailoverPolicy failoverPolicy = builder.build();
    CharSequence unexpectedKey = UUID.randomUUID().toString();
    // when
    boolean result = failoverPolicy.tryPut(unexpectedKey, null);
    // then
    assertFalse(result);
    verify(failedItems, times(0)).put(eq(unexpectedKey), any());
}