### Question:
EclipseCollectionsDeckOfCardsAsList { public ImmutableListMultimap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; } EclipseCollectionsDeckOfCardsAsList(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); ImmutableList<Set<Card>> dealHands(
            MutableStack<Card> shuffled,
            int hands,
            int cardsPerHand); ImmutableList<Card> diamonds(); ImmutableList<Card> hearts(); ImmutableList<Card> spades(); ImmutableList<Card> clubs(); Bag<Suit> countsBySuit(); Bag<Rank> countsByRank(); ImmutableList<Card> getCards(); ImmutableListMultimap<Suit, Card> getCardsBySuit();  }### Answer:
@Test public void cardsBySuitIsImmutable() { var ecCardsBySuit = this.ecDeck.getCardsBySuit(); Verify.assertThrows( UnsupportedOperationException.class, () -> ecCardsBySuit.get(Suit.CLUBS).castToList().remove(0)); Verify.assertThrows( UnsupportedOperationException.class, () -> ecCardsBySuit.get(Suit.CLUBS).castToList().add(null)); Verify.assertThrows( UnsupportedOperationException.class, ecCardsBySuit.get(Suit.CLUBS).castToList()::clear); }
@Test public void cardsBySuit() { var ecCardsBySuit = this.ecDeck.getCardsBySuit(); var jdkCardsBySuit = this.jdkDeck.getCardsBySuit(); Assert.assertEquals(jdkCardsBySuit.get(Suit.CLUBS), ecCardsBySuit.get(Suit.CLUBS)); }