@Test public void testPopulateHeader() throws Exception { lsaHeader1 = new LsaHeader(); lsaHeader1.setLsPacketLen(10); lsaHeader1.setAdvertisingRouter(Ip4Address.valueOf("1.1.1.1")); lsaHeader1.setOptions(2); lsaHeader1.setAge(20); lsaHeader1.setLsType(3); lsaHeader1.setLinkStateId("2.2.2.2"); lsaHeader1.setLsCheckSum(1234); lsaHeader1.setLsSequenceNo(456789); lsaHeader.populateHeader(lsaHeader1); assertThat(lsaHeader1, is(notNullValue())); }
public void populateHeader(LsaHeader lsaHeader) { this.setAge(lsaHeader.age()); this.setOptions(lsaHeader.options()); this.setLsType(lsaHeader.lsType()); this.setLinkStateId(lsaHeader.linkStateId()); this.setAdvertisingRouter(lsaHeader.advertisingRouter()); this.setLsSequenceNo(lsaHeader.lsSequenceNo()); this.setLsCheckSum(lsaHeader.lsCheckSum()); this.setLsPacketLen(lsaHeader.lsPacketLen()); }
LsaHeader implements OspfLsa { public void populateHeader(LsaHeader lsaHeader) { this.setAge(lsaHeader.age()); this.setOptions(lsaHeader.options()); this.setLsType(lsaHeader.lsType()); this.setLinkStateId(lsaHeader.linkStateId()); this.setAdvertisingRouter(lsaHeader.advertisingRouter()); this.setLsSequenceNo(lsaHeader.lsSequenceNo()); this.setLsCheckSum(lsaHeader.lsCheckSum()); this.setLsPacketLen(lsaHeader.lsPacketLen()); } }
LsaHeader implements OspfLsa { public void populateHeader(LsaHeader lsaHeader) { this.setAge(lsaHeader.age()); this.setOptions(lsaHeader.options()); this.setLsType(lsaHeader.lsType()); this.setLinkStateId(lsaHeader.linkStateId()); this.setAdvertisingRouter(lsaHeader.advertisingRouter()); this.setLsSequenceNo(lsaHeader.lsSequenceNo()); this.setLsCheckSum(lsaHeader.lsCheckSum()); this.setLsPacketLen(lsaHeader.lsPacketLen()); }  }
LsaHeader implements OspfLsa { public void populateHeader(LsaHeader lsaHeader) { this.setAge(lsaHeader.age()); this.setOptions(lsaHeader.options()); this.setLsType(lsaHeader.lsType()); this.setLinkStateId(lsaHeader.linkStateId()); this.setAdvertisingRouter(lsaHeader.advertisingRouter()); this.setLsSequenceNo(lsaHeader.lsSequenceNo()); this.setLsCheckSum(lsaHeader.lsCheckSum()); this.setLsPacketLen(lsaHeader.lsPacketLen()); }  int age(); void setAge(int age); int options(); void setOptions(int options); int lsType(); void setLsType(int lsType); String linkStateId(); void setLinkStateId(String linkStateId); Ip4Address advertisingRouter(); void setAdvertisingRouter(Ip4Address advertisingRouter); long lsSequenceNo(); void setLsSequenceNo(long lsSequenceNo); int lsCheckSum(); void setLsCheckSum(int lsCheckSum); int lsPacketLen(); void setLsPacketLen(int lsPacketLen); @Override OspfLsaType getOspfLsaType(); @Override OspfLsa lsaHeader(); byte[] getLsaHeaderAsByteArray(); void populateHeader(LsaHeader lsaHeader); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
LsaHeader implements OspfLsa { public void populateHeader(LsaHeader lsaHeader) { this.setAge(lsaHeader.age()); this.setOptions(lsaHeader.options()); this.setLsType(lsaHeader.lsType()); this.setLinkStateId(lsaHeader.linkStateId()); this.setAdvertisingRouter(lsaHeader.advertisingRouter()); this.setLsSequenceNo(lsaHeader.lsSequenceNo()); this.setLsCheckSum(lsaHeader.lsCheckSum()); this.setLsPacketLen(lsaHeader.lsPacketLen()); }  int age(); void setAge(int age); int options(); void setOptions(int options); int lsType(); void setLsType(int lsType); String linkStateId(); void setLinkStateId(String linkStateId); Ip4Address advertisingRouter(); void setAdvertisingRouter(Ip4Address advertisingRouter); long lsSequenceNo(); void setLsSequenceNo(long lsSequenceNo); int lsCheckSum(); void setLsCheckSum(int lsCheckSum); int lsPacketLen(); void setLsPacketLen(int lsPacketLen); @Override OspfLsaType getOspfLsaType(); @Override OspfLsa lsaHeader(); byte[] getLsaHeaderAsByteArray(); void populateHeader(LsaHeader lsaHeader); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }