@Test
public void testStore() throws Exception {

  final PropertyManagement pm = new PropertyManagement();
  pm.store(
      ExtractParameters.Extract.QUERY,
      QueryBuilder.newBuilder().addTypeName("adapterId").indexName("indexId").build());
  assertEquals(
      QueryBuilder.newBuilder().addTypeName("adapterId").indexName("indexId").build(),
      pm.getPropertyAsQuery(ExtractParameters.Extract.QUERY));
  final Path path1 = new Path("http://java.sun.com/j2se/1.3/foo");
  pm.store(Input.HDFS_INPUT_PATH, path1);
  final ByteArrayOutputStream bos = new ByteArrayOutputStream();
  try (ObjectOutputStream os = new ObjectOutputStream(bos)) {
    os.writeObject(pm);
  }
  final ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
  try (ObjectInputStream is = new ObjectInputStream(bis)) {
    final PropertyManagement pm2 = (PropertyManagement) is.readObject();
    assertEquals(
        QueryBuilder.newBuilder().addTypeName("adapterId").indexName("indexId").build(),
        pm2.getPropertyAsQuery(ExtractParameters.Extract.QUERY));
    assertEquals(path1, pm2.getPropertyAsPath(Input.HDFS_INPUT_PATH));
  }
}