added tests and a solution on a bug in doCreatedByAndAt