@Test
public void testCloseCleanUp() throws Exception {

    // Given
    ObjectBuffer<ObjectToBuffer> buffer = new ObjectBuffer<>(ObjectToBuffer.class);
    Path tempFile = (Path) ReflectionTestUtils.getField(buffer, "tempFile");
    // When
    assertTrue(Files.exists(tempFile));
    buffer.close();
    // Then
    assertFalse(Files.exists(tempFile));
}