### Question:
PlatformPartitionDeserializer implements Deserializer<PlatformPartition> { @Override public PlatformPartition deserialize(byte[] input) throws IllegalArgumentException { int id = ByteUtil.bytesToInt(input); return new DefaultPartition(id); }  @Override PlatformPartition deserialize(byte[] input); @Override PlatformPartition deserialize(InputStream input);  }### Answer:
@Test public void testSerialize() { assertEquals(new DefaultPartition(Integer.MIN_VALUE), deserializer.deserialize(new byte[] { -128, 0, 0, 0 })); assertEquals(new DefaultPartition(-1), deserializer.deserialize(new byte[] { -1, -1, -1, -1 })); assertEquals(new DefaultPartition(0), deserializer.deserialize(new byte[] { 0, 0, 0, 0 })); assertEquals(new DefaultPartition(1), deserializer.deserialize(new byte[] { 0, 0, 0, 1 })); assertEquals(new DefaultPartition(0x01020304), deserializer.deserialize(new byte[] { 1, 2, 3, 4 })); assertEquals(new DefaultPartition(Integer.MAX_VALUE), deserializer.deserialize(new byte[] { 127, -1, -1, -1 })); }