1. A computer-implemented method for testing a clusterware agent configured to communicate between an application and a cluster manager executing clusterware, the method comprising: executing on a computer said clusterware agent, wherein said clusterware agent comprises clusterware-side components and application-side components, and wherein a given cluster manager manages resources and services of the cluster by invoking clusterware-side components that communicate via an Application Programming Interface (API) with application-side components that communicate with said application; and emulating a behavior of said given cluster manager by one or more clusterware-side components by: determining one or more API functions to invoke based, at least in part, on a test unit, wherein the test unit is embedded within said clusterware agent, and the test unit is designed to cause an application failure; determining one or more clusterware-side messages for invoking said one or more API functions; and invoking said one or more API functions of said API by using said clusterware-side messages; wherein said method is performed by one or more computing devices.