Factory boy

ref #306