Add assertNotEmpty to tests and use it.

Extract the use of assertTrue(len(...)) into a method. The docs for
assertTrue say that it equates to bool(expr) is True and so the format
is correct however it reads inconsistently.

Change-Id: I75acf75f6eaac9b7f92fd452cc60ab0cfd447c7f
Merge "Add assertNotEmpty to tests and use it."