public void testDatabaseTypeParentDoesntExist() throws Exception {
    testRead();

    JDBCDataSourceType dbType = target.getDataSourceType("my other db type");
    dbType.putProperty(JDBCDataSourceType.PARENT_TYPE_NAME, "non existant parent");

    ByteArrayOutputStream out = new ByteArrayOutputStream();
    target.write(out);

    ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
    try {
      target.read(in);
      fail("Parent type didn't exist but no exception was thrown.");
    } catch (IllegalStateException ex) {
      // test passed
    }
  }