Writing test for UserDetail