Improve key reference unit test
Fix code indentation