### Question:
FramedIPNetmaskAttribute extends Attribute { public byte[] getMask() { return mask; } FramedIPNetmaskAttribute(int msb, int msb2, int msb3, int msb4);  FramedIPNetmaskAttribute(byte[] octets); byte[] getMask(); String toStringImpl();  }### Answer:
@Test public void testFromOctets() { byte[] o = new byte[6]; o[0] = (byte) AttributeType.FRAMED_IP_NETMASK.getTypeCode(); o[1] = 6; o[2] = 5; o[3] = 4; o[4] = 3; o[5] = 2; FramedIPNetmaskAttribute a = new FramedIPNetmaskAttribute(o); Assert.assertEquals(a.getMask()[0], 5); Assert.assertEquals(a.getMask()[1], 4); Assert.assertEquals(a.getMask()[2], 3); Assert.assertEquals(a.getMask()[3], 2); }
@Test public void testFromAddress() throws IOException { FramedIPNetmaskAttribute a = new FramedIPNetmaskAttribute(5, 4, 3, 2); Assert.assertEquals(a.getMask()[0], 5); Assert.assertEquals(a.getMask()[1], 4); Assert.assertEquals(a.getMask()[2], 3); Assert.assertEquals(a.getMask()[3], 2); Assert.assertEquals(a.getOctets()[0], AttributeType.FRAMED_IP_NETMASK.getTypeCode()); Assert.assertEquals(a.getOctets()[1], 6); Assert.assertEquals(a.getOctets()[2], 5); Assert.assertEquals(a.getOctets()[3], 4); Assert.assertEquals(a.getOctets()[4], 3); Assert.assertEquals(a.getOctets()[5], 2); }