### Question:
IPortImpl implements IPort { @Override public boolean isActiveIsl() { return (peerSwitch != null && peerPortNum >= 0 && isActive && isForwarding); } IPortImpl(ISwitchImpl sw, PortStateType state, int portNumber); InfoMessage makePorChangetMessage(); @Override void enable(); @Override void disable(); @Override void block(); @Override void unblock(); void modPort(PortModMessage message); @Override boolean isActive(); @Override boolean isForwarding(); @Override int getNumber(); @Override void setLatency(int latency); @Override int getLatency(); @Override String getPeerSwitch(); @Override void setPeerSwitch(String peerSwitch); @Override void setPeerPortNum(int peerPortNum); @Override int getPeerPortNum(); @Override void setIsl(DatapathId peerSwitch, int peerPortNum); ISwitchImpl getSw(); void setSw(ISwitchImpl sw); @Override boolean isActiveIsl(); @Override PortStatsEntry getStats();  }### Answer:
@Test public void isActiveIsl() throws Exception { port.enable(); port.setPeerSwitch("00:00:00:00:00:01"); port.setPeerPortNum(10); assertTrue(port.isActiveIsl()); port.disable(); assertFalse(port.isActiveIsl()); port.enable(); port.block(); assertFalse(port.isActiveIsl()); port.unblock(); assertTrue(port.isActiveIsl()); port.disable(); port.unblock(); assertFalse(port.isActiveIsl()); }