@Test
public void testGetBuffer() throws InvalidConfigException {

  // get buffer by physical partition
  createBufMult();
  addEvents();
  Integer pPartitionId = 100;
  // get buffer by partition id
  PhysicalPartition pPartition = new PhysicalPartition(pPartitionId, "multBufferTest1");
  DbusEventBufferAppendable buf = _eventBufferMult.getDbusEventBufferAppendable(pPartition);
  assertNotNull(buf,"cannot get by pPartition" + pPartition);
  // get buffer by physical partition
  buf = _eventBufferMult.getDbusEventBufferAppendable(pPartition);
  assertNotNull(buf,"cannot get by pPartition" + pPartition);
  // get buffer by logical source id
  int lSrcId = 1;
  buf = _eventBufferMult.getDbusEventBufferAppendable(lSrcId);
  assertNotNull(buf,"cannot get by lSrcId" + lSrcId);
  // logical source 2 , default partition  - SAME BUFFER
  lSrcId = 2;
  LogicalSource lSource = new LogicalSource(lSrcId, "srcName2"); // correct source name, default partition 0
  DbusEventBufferAppendable buf1 = _eventBufferMult.getDbusEventBufferAppendable(lSource);
  assertNotNull(buf1, "cannot get buffer by lSource " + lSource);
  assertTrue(buf1 == buf, "buf and buf1 should be the same buffer");
  // logical source, different logical partition 1 - SAME BUFFER
  LogicalPartition lPartition = new LogicalPartition((short)1);
  buf1 = _eventBufferMult.getDbusEventBufferAppendable(lSource, lPartition);
  // should be the same buffer
  assertNotNull(buf1, "cannot get buffer by lSource " + lSource + ";lPartition =" + lPartition);
  assertTrue(buf1 == buf, "buf and buf1 should be the same buffer");
  // logical source, different logical partition 2 - DIFFERENT BUFFER
  lPartition = new LogicalPartition((short)2);
  buf1 = _eventBufferMult.getDbusEventBufferAppendable(lSource, lPartition);
  assertNotNull(buf1, "cannot get buffer by lSource " + lSource + ";lPartition =" + lPartition);
  assertTrue(buf1 != buf, "buf and buf1 should not be the same buffer");
  // logical source, different logical partition 12 - DIFFERENT BUFFER (same as for lsr=2,lp=2)
  DbusEventBufferAppendable buf2 = _eventBufferMult.getDbusEventBufferAppendable(12);
  assertNotNull(buf2, "cannot get buffer by lSourceid " + 12);
  assertTrue(buf2 != buf, "buf and buf2 should not be the same buffer");
  assertTrue(buf1 == buf2, "buf2 and buf1 should be the same buffer");
}