Enable the mock battery:
$ gdbus call --session --dest "com.canonical.indicator.power" \
--object-path /com/canonical/indicator/power/Testing \
--method org.freedesktop.DBus.Properties.Set \
com.canonical.indicator.power.Testing \
MockBatteryEnabled \
"<true>"
Set the mock battery's charge to 10%
$ gdbus call --session --dest "com.canonical.indicator.power" \
--object-path /com/canonical/indicator/power/Testing \
--method org.freedesktop.DBus.Properties.Set \
com.canonical.indicator.power.Testing \
MockBatteryLevel \
"<uint32 10>"