@Test
public void testWriteAndReadPrimaryLock() throws IOException {

  PrimaryLock expect = getPrimaryLock();
  ThemisLock actual = new PrimaryLock();
  writeObjectToBufferAndRead(expect, actual);
  Assert.assertTrue(expect.equals(actual));
}