Added batch API in automation lib + simple test