### Question:
TypeEncoder { static String encodeBool(Bool value) { byte[] rawValue = new byte[Type.MAX_BYTE_LENGTH]; if (value.getValue()) { rawValue[rawValue.length - 1] = 1; } return Numeric.toHexStringNoPrefix(rawValue); } private  TypeEncoder(); @SuppressWarnings("unchecked") static String encode(Type parameter);  }### Answer:
@Test public void testBoolEncode() { assertThat(TypeEncoder.encodeBool(new Bool(false)), is("0000000000000000000000000000000000000000000000000000000000000000")); assertThat(TypeEncoder.encodeBool(new Bool(true)), is("0000000000000000000000000000000000000000000000000000000000000001")); }