I'm failing to understand why this does not work. I'm assuming it's something simple that I'm overlooking. All other other test methods not utilizing a token work fine. There is no expiration currently on the token, and I can use it fine with Postman.
@Test
public void getUser() throws Exception {
String token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJsd2lsbGlhbXMxNiIsInJvbGVzIjoidXNlciIsImlhdCI6MTUxNDQ0OTgzM30.WKMQ_oPPiDcc6sGtMJ1Y9hlrAAc6U3xQLuEHyAnM1FU";
MvcResult mvcResult = mockMvc.perform(
MockMvcRequestBuilders.get("/api/users/lwilliams16")
.header("authentication", "Bearer " + token))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andDo(print())
.andReturn();
System.out.println(mvcResult.getResponse().getContentAsString());
}