} catch (IOException e) {
}
}
public void testTwoBlockTwoPartMessage() throws Exception {
DimeInputBuffer buff = messageBuffer(TestData.TWOBLOCK_TWOPARTS_MESSAGE);
assertTrue("Initial message", buff.nextMessage());
assertTrue("Initial part", buff.nextPart());
assertTrue("Missing data", buff.require(1));
int offset = buff.getOffset();
assertEquals("Data value", 1, buff.getBuffer()[offset++]);
buff.setOffset(offset);
assertTrue("Missing data", buff.require(8));
offset = buff.getOffset();
for (int i = 0; i < 8; i++) {
assertEquals("Data value", i + 2, buff.getBuffer()[offset + i]);
}
assertTrue("Missing part", buff.nextPart());
assertFalse("No more messages", buff.nextMessage());
}