@Test public void testSetDestinationWrongType() { destination = new Destination(); try { adapter.setDestination(destination); Assert.fail("ClassCastException expected"); } catch (ClassCastException e) { } }
public void setDestination(Destination destination) { Destination oldDestination = getDestination(); setParent(destination); if (oldDestination != null) oldDestination.setAdapter(null); if (destination.getAdapter() != this) { destination.setAdapter(this); } }
ServiceAdapter extends ManageableComponent { public void setDestination(Destination destination) { Destination oldDestination = getDestination(); setParent(destination); if (oldDestination != null) oldDestination.setAdapter(null); if (destination.getAdapter() != this) { destination.setAdapter(this); } } }
ServiceAdapter extends ManageableComponent { public void setDestination(Destination destination) { Destination oldDestination = getDestination(); setParent(destination); if (oldDestination != null) oldDestination.setAdapter(null); if (destination.getAdapter() != this) { destination.setAdapter(this); } } ServiceAdapter();  ServiceAdapter(boolean enableManagement); }
ServiceAdapter extends ManageableComponent { public void setDestination(Destination destination) { Destination oldDestination = getDestination(); setParent(destination); if (oldDestination != null) oldDestination.setAdapter(null); if (destination.getAdapter() != this) { destination.setAdapter(this); } } ServiceAdapter();  ServiceAdapter(boolean enableManagement); void start(); void stop(); Destination getDestination(); void setDestination(Destination destination); abstract Object invoke(Message message); Object manage(CommandMessage commandMessage); Object getAdapterState(); void setAdapterState(Object adapterState); boolean handlesSubscriptions(); }
ServiceAdapter extends ManageableComponent { public void setDestination(Destination destination) { Destination oldDestination = getDestination(); setParent(destination); if (oldDestination != null) oldDestination.setAdapter(null); if (destination.getAdapter() != this) { destination.setAdapter(this); } } ServiceAdapter();  ServiceAdapter(boolean enableManagement); void start(); void stop(); Destination getDestination(); void setDestination(Destination destination); abstract Object invoke(Message message); Object manage(CommandMessage commandMessage); Object getAdapterState(); void setAdapterState(Object adapterState); boolean handlesSubscriptions(); static final String LOG_CATEGORY; }