### Question:
Usage { public void printUsageForCommand( AdminCommand.Provider command, Consumer<String> output ) { final CommandUsage commandUsage = new CommandUsage( command, scriptName ); commandUsage.printDetailed( output ); } Usage( String scriptName, CommandLocator commands ); void printUsageForCommand( AdminCommand.Provider command, Consumer<String> output ); void print( Consumer<String> output );  }### Answer:
@Test void shouldPrintUsageForACommand() { AdminCommand.Provider commandProvider = mockCommand( "bam", "A summary", AdminCommandSection.general() ); AdminCommand.Provider[] commands = new AdminCommand.Provider[]{commandProvider}; final Usage usage = new Usage( "neo4j-admin", new CannedLocator( commands ) ); usage.printUsageForCommand( commandProvider, out ); InOrder ordered = inOrder( out ); ordered.verify( out ).accept( "usage: neo4j-admin bam " ); ordered.verify( out ).accept( "" ); ordered.verify( out ).accept( "environment variables:" ); ordered.verify( out ).accept( " NEO4J_CONF Path to directory which contains neo4j.conf." ); ordered.verify( out ).accept( " NEO4J_DEBUG Set to anything to enable debug output." ); ordered.verify( out ).accept( " NEO4J_HOME Neo4j home directory." ); ordered.verify( out ).accept( " HEAP_SIZE Set JVM maximum heap size during command execution." ); ordered.verify( out ).accept( " Takes a number and a unit, for example 512m." ); ordered.verify( out ).accept( "" ); ordered.verify( out ).accept( "description" ); }