Correcting a JUnit that returns a non null but empty element