@Test
public void testSerialization() throws IOException, ClassNotFoundException {

  BigtableOptions options =
      BigtableOptions.builder()
          .setProjectId("project")
          .setInstanceId("instance")
          .setUserAgent("foo")
          .build();
  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream oos = new ObjectOutputStream(bos);
  oos.writeObject(options);
  oos.close();
  byte[] byteArray = bos.toByteArray();
  ByteArrayInputStream bais = new ByteArrayInputStream(byteArray);
  ObjectInputStream iis = new ObjectInputStream(bais);
  BigtableOptions deserialized = (BigtableOptions) iis.readObject();
  Assert.assertEquals(options, deserialized);
}