### Question:
OpenflowUtils { public static PortStateV10 createPortState(long input){ final Boolean psLinkDown = ((input) & (1<<0)) != 0; final Boolean psBlocked = ((input) & (1<<1)) != 0; final Boolean psLive = ((input) & (1<<2)) != 0; final Boolean psStpListen = ((input) & (1<<8)) == 0; final Boolean psStpLearn = ((input) & (1<<8)) != 0; final Boolean psStpForward = ((input) & (1<<9)) != 0; final Boolean psStpBlock = (((input) & (1<<9)) != 0) && (((input) & (1<<8)) != 0); final Boolean psStpMask = ((input) & (1<<10)) != 0; return new PortStateV10(psBlocked, psLinkDown, psLive, psStpBlock, psStpForward, psStpLearn, psStpListen, psStpMask); } private  OpenflowUtils(); static PortStateV10 createPortState(long input); static PortConfigV10 createPortConfig(long input); static PortFeaturesV10 createPortFeatures(long input);  }### Answer:
@Test public void testPortState() { PortStateV10 state = OpenflowUtils.createPortState(512L); Assert.assertEquals("Wrong port state", new PortStateV10(false, false, false, false, true, false, true, false), state); state = OpenflowUtils.createPortState(1793L); Assert.assertEquals("Wrong port state", new PortStateV10(false, true, false, true, true, true, false, true), state); state = OpenflowUtils.createPortState(1L); Assert.assertEquals("Wrong port state", new PortStateV10(false, true, false, false, false, false, true, false), state); }