@Test(expected = NoSuchObjectException.class)
  public void testDropFunctionNoSuchFunction() throws Exception {
    client.dropFunction(DEFAULT_DATABASE, "no_such_function");
  }
This test creates and queries a function and then drops it. Good for testing the happy path.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestFunctions.java