assertEquals(bCodec.getACodec(), bCodec2.getACodec());
assertEquals(bCodec.getBCodec(), bCodec2.getBCodec());
}
public void testGetSpeciferForPopulationCodec() throws IOException, Pack200Exception {
PopulationCodec pCodec = new PopulationCodec(Codec.BYTE1, Codec.CHAR3, Codec.UNSIGNED5);
int[] specifiers = CodecEncoding.getSpecifier(pCodec, null);
assertTrue(specifiers[0] > 140);
assertTrue(specifiers[0] < 189);
byte[] bytes = new byte[specifiers.length - 1];
for (int i = 0; i < bytes.length; i++) {
bytes[i] = (byte) specifiers[i+1];
}
InputStream in = new ByteArrayInputStream(bytes);
PopulationCodec pCodec2 = (PopulationCodec) CodecEncoding.getCodec(specifiers[0], in, null);
assertEquals(pCodec.getFavouredCodec(), pCodec2.getFavouredCodec());
assertEquals(pCodec.getTokenCodec(), pCodec2.getTokenCodec());
assertEquals(pCodec.getUnfavouredCodec(), pCodec2.getUnfavouredCodec());
}