Fixed HasManyThroughAssociation and added association conditions for test