PowerClient extends DawgClient implements PowerInput, PowerOutput { @Override public void powerOn() throws PowerException { performPowerOperation(PowerOperation.on); } PowerClient(MetaStb stb);  PowerClient(String catsHost, String powerHost, String outlet, String powerType); @Override void powerOn(); @Override void powerOff(); @Override void reboot(); void performPowerOperation(PowerOperation op); @Override boolean isPowerOn(); static final String POWER_SERVICE; static final String REST; static final int DEFAULT_PORT; }
@Test (expectedExceptions=PowerException.class) public void testPowerOnWithNullPowerHost() throws PowerException { MockPowerClient client = new MockPowerClient(null,null,null,null, HttpStatus.SC_BAD_REQUEST); client.powerOn(); }
@Test public void testPowerOn() { PowerClient client = new MockPowerClient(catsHost,null,null,null); try { client.powerOn(); } catch (PowerException e) { Assert.fail("power on threw exception " + e); } }