Dictionary.java dictionary writing test

again, horrendous code, most of it is probably useless