### Question:
BalanceKitPermissions extends KitPermissions { @Override public boolean isAvailableTo(KitChallenger kitChallenger) { return kitChallenger.hasPurchase(purchasableId); } BalanceKitPermissions(Purchasable purchasable); @Override boolean isAvailableTo(KitChallenger kitChallenger); @Override Message unavailabilityMessage(KitChallenger kitChallenger);  }### Answer:
@Test public void testAvailability() { int id = 10; Purchasable purchasable = mock(Purchasable.class); when(purchasable.getPrice()).thenReturn(100L); when(purchasable.getId()).thenReturn(id); BalanceKitPermissions kitPermissions = new BalanceKitPermissions( purchasable ); KitChallenger kitChallenger = mock(KitChallenger.class); when(kitChallenger.hasPurchase(eq(id))).thenReturn(true); kitPermissions.isAvailableTo(kitChallenger); }