Using reflection to help in unit testing