passNo2);
assertTrue(
"Compressed data the same for stream with different dictionaries.",
pass12);
Inflater inflNo = new Inflater();
Inflater infl1 = new Inflater();
Inflater infl2 = new Inflater();
byte[] result = new byte[100];
int decLen;
inflNo.setInput(outputNo, 0, dataLenNo);
decLen = inflNo.inflate(result);
assertFalse(inflNo.needsDictionary());
inflNo.end();
assertEquals(inputString, new String(result, 0, decLen));
infl1.setInput(output1, 0, dataLen1);
decLen = infl1.inflate(result);
assertTrue(infl1.needsDictionary());
infl1.setDictionary(dictionary1.getBytes());
decLen = infl1.inflate(result);
infl1.end();
assertEquals(inputString, new String(result, 0, decLen));
infl2.setInput(output2, 0, dataLen2);
decLen = infl2.inflate(result);
assertTrue(infl2.needsDictionary());
infl2.setDictionary(dictionary2.getBytes());
decLen = infl2.inflate(result);
infl2.end();
assertEquals(inputString, new String(result, 0, decLen));
inflNo = new Inflater();
infl1 = new Inflater();
inflNo.setInput(outputNo, 0, dataLenNo);
try {
infl1.setDictionary(dictionary1.getBytes());
fail("IllegalArgumentException expected.");
} catch (IllegalArgumentException ee) {