First preparation for unit tests.

This was done because I tried this in Java, and although it was not
needed for Java after all, I need to keep the source codes in sync.
Merge branch 'PrepForUnitTests' into develop

Merge