### Question:
Bubble extends Point<Bubble> { void handleCollision(Collection<? extends Point> toCheck, Hashtable<Integer, Bubble> allBubbles) { var toBePopped = false; for (var point : toCheck) { var otherId = point.id; if (allBubbles.get(otherId) != null && this.id != otherId && this.touches(allBubbles.get(otherId))) { allBubbles.get(otherId).pop(allBubbles); toBePopped = true; } } if (toBePopped) { this.pop(allBubbles); } } Bubble(int x, int y, int id, int radius);   }### Answer:
@Test void handleCollisionTest() { var b1 = new Bubble(0, 0, 1, 2); var b2 = new Bubble(1, 1, 2, 1); var b3 = new Bubble(10, 10, 3, 1); var bubbles = new Hashtable<Integer, Bubble>(); bubbles.put(1, b1); bubbles.put(2, b2); bubbles.put(3, b3); var bubblesToCheck = new ArrayList<Point>(); bubblesToCheck.add(b2); bubblesToCheck.add(b3); b1.handleCollision(bubblesToCheck, bubbles); assertNull(bubbles.get(1)); assertNull(bubbles.get(2)); assertNotNull(bubbles.get(3)); }