Classificar fluxo por chave java

.sorted(Map.Entry.<String, Long> comparingByValue().reversed().thenComparing(Map.Entry.comparingByKey()))
Inna Kim