### Question:
PrintingImportLogicMonitor implements ImportLogic.Monitor { @Override public void insufficientAvailableMemory( long estimatedCacheSize, long optimalMinimalHeapSize, long availableMemory ) { err.printf( "WARNING: %s memory may not be sufficient to complete this import. Suggested memory distribution is:%n" + "heap size: %s%n" + "minimum free and available memory excluding heap size: %s", bytes( availableMemory ), bytes( optimalMinimalHeapSize ), bytes( estimatedCacheSize ) ); } PrintingImportLogicMonitor( PrintStream out, PrintStream err ); @Override void doubleRelationshipRecordUnitsEnabled(); @Override void mayExceedNodeIdCapacity( long capacity, long estimatedCount ); @Override void mayExceedRelationshipIdCapacity( long capacity, long estimatedCount ); @Override void insufficientHeapSize( long optimalMinimalHeapSize, long heapSize ); @Override void abundantHeapSize( long optimalMinimalHeapSize, long heapSize ); @Override void insufficientAvailableMemory( long estimatedCacheSize, long optimalMinimalHeapSize, long availableMemory );  }### Answer:
@Test void insufficientAvailableMemory() { long estimatedCacheSize = gibiBytes( 2 ); long optimalHeapSize = gibiBytes( 2 ); long availableMemory = gibiBytes( 1 ); monitor.insufficientAvailableMemory( estimatedCacheSize, optimalHeapSize, availableMemory ); String text = errBuffer.toString(); assertTrue( text.contains( "WARNING" ) ); assertTrue( text.contains( "may not be sufficient" ) ); assertTrue( text.contains( bytes( estimatedCacheSize ) ) ); assertTrue( text.contains( bytes( optimalHeapSize ) ) ); assertTrue( text.contains( bytes( availableMemory ) ) ); }