### Question:
CustomCollectionsDeckOfCardsAsList { public MutableListMultimap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; } CustomCollectionsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); MutableSet<Card> deal(Deque<Card> deque, int count); MutableList<MutableSet<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); MutableList<MutableSet<Card>> dealHands(Deque<Card> shuffled, int hands, int cardsPerHand); MutableList<Card> diamonds(); MutableList<Card> hearts(); MutableList<Card> spades(); MutableList<Card> clubs(); MutableBag<Suit> countsBySuit(); MutableBag<Rank> countsByRank(); MutableList<Card> getCards(); MutableListMultimap<Suit, Card> getCardsBySuit();  }### Answer:
@Test public void cardsBySuit() { var jdk1CardsBySuit = this.jdkDeck.getCardsBySuit(); var jdk2CardsBySuit = this.customDeck.getCardsBySuit(); Assert.assertEquals(jdk1CardsBySuit.get(Suit.CLUBS), jdk2CardsBySuit.get(Suit.CLUBS)); }
@Test public void cardsBySuitIsImmutable() { var jdk2CardsBySuit = this.customDeck.getCardsBySuit(); Verify.assertThrows( UnsupportedOperationException.class, () -> jdk2CardsBySuit.remove(Suit.CLUBS)); Verify.assertThrows( UnsupportedOperationException.class, jdk2CardsBySuit::clear); Verify.assertThrows( UnsupportedOperationException.class, () -> jdk2CardsBySuit.get(Suit.CLUBS).remove(0)); Verify.assertThrows( UnsupportedOperationException.class, () -> jdk2CardsBySuit.get(Suit.CLUBS).add(null)); Verify.assertThrows( UnsupportedOperationException.class, jdk2CardsBySuit.get(Suit.CLUBS)::clear); }