@Test
public void testToByteAndParseFromByte() throws IOException {

  PrimaryLock expect = getPrimaryLock();
  byte[] lockByte = ThemisLock.toByte(expect);
  ThemisLock actual = ThemisLock.parseFromByte(lockByte);
  Assert.assertTrue(expect.equals(actual));
}