hmmm.
You could try
mockMvc.perform(get("/user-byName").sessionAttr("userClientObject", userClientObject))
.andExpect(status().isOk());
to setup userClientObject in test fixture.
What does "return getUserByName(userClient, firstName, lastName);" exactly do? If it doesn't involve external dependence, just assert your return in andExpect(jsonPath()) clause.
I thought it should be @SessionAttribute by the way.