Hodge podge of test code, trial and error.