Remove usage of internal library function in basic generator

Internal function shouldn't be used from the outside. Adds unit tests
to verify that the change has no other side effects.

Change-Id: I72d34c253816cfc4c05008f504c9abe6d2182efd
Closes-Bug: bug 1293543
2 files changed