### Question:
PrintingImportLogicMonitor implements ImportLogic.Monitor { @Override public void insufficientHeapSize( long optimalMinimalHeapSize, long heapSize ) { err.printf( "WARNING: heap size %s may be too small to complete this import. Suggested heap size is %s", bytes( heapSize ), bytes( optimalMinimalHeapSize ) ); } 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 insufficientHeapSize() { long optimalHeapSize = gibiBytes( 2 ); long heapSize = gibiBytes( 1 ); monitor.insufficientHeapSize( optimalHeapSize, heapSize ); String text = errBuffer.toString(); assertTrue( text.contains( "WARNING" ) ); assertTrue( text.contains( "too small" ) ); assertTrue( text.contains( bytes( heapSize ) ) ); assertTrue( text.contains( bytes( optimalHeapSize ) ) ); }