@Test
public void testDeserialize() throws IOException {

  File file = File.createTempFile("test-recording", ".sbr");
  adapter.setCurrentFile(file);
  CameraServerData data = new CameraServerData("name", null, (1 << 15) / 100, Integer.MAX_VALUE);
  byte[] bytes = adapter.serialize(data);
  adapter.cleanUp();
  CameraServerData deserialize = adapter.deserialize(bytes, 0);
  deleteTempFiles(file);
  assertAll(
      () -> assertEquals(data.getName(), deserialize.getName(), "Wrong name"),
      () -> assertEquals(data.getFps(), deserialize.getFps(), "Wrong FPS"),
      () -> assertEquals(data.getBandwidth(), deserialize.getBandwidth(), "Wrong bandwidth"),
      () -> assertNull(deserialize.getImage(), "Image should be null (video file does not exist)")
  );
}