Writing test and references