@Test public void assigned() { ReceptorListener listener = mock(ReceptorListener.class); ReceptorListener stub = new ReceptorListener() {}; TileableListener tileableListener = mock(TileableListener.class); receptor.addListener(listener); receptor.addListener(stub); receptor.addListener(tileableListener); receptor.setPowerUp(null); verify(listener, times(1)).receptorAssigned(receptor); }
public void setPowerUp(PowerUp powerUp) { this.powerUp = powerUp; informAssigned(); }
Receptor extends Tileable { public void setPowerUp(PowerUp powerUp) { this.powerUp = powerUp; informAssigned(); } }
Receptor extends Tileable { public void setPowerUp(PowerUp powerUp) { this.powerUp = powerUp; informAssigned(); }  }
Receptor extends Tileable { public void setPowerUp(PowerUp powerUp) { this.powerUp = powerUp; informAssigned(); }  void rotate(int turns); int getRotation(); Slot getSlot(Direction direction); boolean isMarked(); boolean isLocked(); void lock(); void unlock(); PowerUp getPowerUp(); void setPowerUp(PowerUp powerUp); @Override boolean isReleasable(Direction direction, Marble marble); @Override boolean allowsConnection(Direction direction); @Override boolean accepts(Direction direction, Marble marble); @Override void accept(Direction direction, Marble marble); }
Receptor extends Tileable { public void setPowerUp(PowerUp powerUp) { this.powerUp = powerUp; informAssigned(); }  void rotate(int turns); int getRotation(); Slot getSlot(Direction direction); boolean isMarked(); boolean isLocked(); void lock(); void unlock(); PowerUp getPowerUp(); void setPowerUp(PowerUp powerUp); @Override boolean isReleasable(Direction direction, Marble marble); @Override boolean allowsConnection(Direction direction); @Override boolean accepts(Direction direction, Marble marble); @Override void accept(Direction direction, Marble marble);  }