Added usage of const command factory in pending command state.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>