Remove unused var in EntityPerPageBuilderTest and clarify control flow

Change-Id: Iffff4d4459b84d6b02a79a2dc4e8b3283a764b9f
Merge "Remove unused var in EntityPerPageBuilderTest and clarify control flow"