Extract Es related assert into a module

Signed-off-by: chatgris <jboyer@af83.com>