### Question:
BooleanField extends AbstractField<Boolean> { @Override public byte[] getBytes() { return (value) ? TRUE_BYTES : FALSE_BYTES; } protected  BooleanField(int tagNum, boolean value); @Override Boolean getValue(); @Override byte[] getBytes(); boolean booleanValue(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testGetBytesTrue() { BooleanField booleanField = new BooleanField(tag, true); byte[] bytes = booleanField.getBytes(); assertEquals(1, bytes.length); assertEquals('Y', bytes[0]); }
@Test public void testGetBytesFalse() { BooleanField booleanField = new BooleanField(tag, false); byte[] bytes = booleanField.getBytes(); assertEquals(1, bytes.length); assertEquals('N', bytes[0]); }