### Question:
DefaultPageCacheTracer implements PageCacheTracer { @Override public EvictionRunEvent beginPageEvictions( int pageCountToEvict ) { return evictionRunEvent; }  @Override void mappedFile( File file ); @Override void unmappedFile( File file ); @Override EvictionRunEvent beginPageEvictions( int pageCountToEvict ); @Override MajorFlushEvent beginFileFlush( PageSwapper swapper ); @Override MajorFlushEvent beginCacheFlush(); @Override long faults(); @Override long evictions(); @Override long pins(); @Override long unpins(); @Override long hits(); @Override long flushes(); @Override long bytesRead(); @Override long bytesWritten(); @Override long filesMapped(); @Override long filesUnmapped(); @Override long evictionExceptions(); @Override double hitRatio(); @Override double usageRatio(); @Override void pins( long pins ); @Override void unpins( long unpins ); @Override void hits( long hits ); @Override void faults( long faults ); @Override void bytesRead( long bytesRead ); @Override void evictions( long evictions ); @Override void evictionExceptions( long evictionExceptions ); @Override void bytesWritten( long bytesWritten ); @Override void flushes( long flushes ); @Override void maxPages( long maxPages );  }### Answer:
@Test void mustCountEvictions() { try ( EvictionRunEvent evictionRunEvent = tracer.beginPageEvictions( 2 ) ) { try ( EvictionEvent evictionEvent = evictionRunEvent.beginEviction() ) { FlushEvent flushEvent = evictionEvent.flushEventOpportunity().beginFlush( 0, 0, swapper ); flushEvent.addBytesWritten( 12 ); flushEvent.done(); } try ( EvictionEvent evictionEvent = evictionRunEvent.beginEviction() ) { FlushEvent flushEvent = evictionEvent.flushEventOpportunity().beginFlush( 0, 0, swapper ); flushEvent.addBytesWritten( 12 ); flushEvent.done(); evictionEvent.threwException( new IOException() ); } try ( EvictionEvent evictionEvent = evictionRunEvent.beginEviction() ) { FlushEvent flushEvent = evictionEvent.flushEventOpportunity().beginFlush( 0, 0, swapper ); flushEvent.addBytesWritten( 12 ); flushEvent.done(); evictionEvent.threwException( new IOException() ); } evictionRunEvent.beginEviction().close(); } assertCounts( 0, 0, 0, 0, 4, 2, 3, 0, 36, 0, 0, 0d); }