Test writing anonymous instances