@Test public void customQueryType() {
QueryType qt = GstQueryAPI.GSTQUERY_API.gst_query_type_register("test", "A test query type");
assertEquals("nick mismatch", qt, QueryType.fromNick("test"));
}
@Test public void makeWriteable() {
Query query = new SegmentQuery(Format.TIME);
assertTrue("New query is not writable", query.isWritable());
// Bumping the ref count makes this instance non writable
GstNative.load(GstMiniObjectAPI.class).gst_mini_object_ref(query);
assertFalse("Query with multiple references should not be writable", query.isWritable());
// Now get a new reference that is writable
query = query.makeWritable();
assertTrue("Query not writable after makeWritable", query.isWritable());
}