@Test
public void shouldSucceedAuthenticate() throws Exception {

	// mock behavior
	when(this.mockClient.getJWT(eq("goodUsername"), eq("goodPassword"), anyString()))
		.thenReturn(JWT.decode( // using dummy token string from https://jwt.io/
			"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiR29vZCBUb2tlbiJ9.II4bNgtahHhV4jl7dgGn8CGjVxZWwBMZht-4LXeqB_Y"
		)
	);
	// test
	this.valve.authenticate("goodUsername", "goodPassword");
	// verify
	verify(this.mockClient).getJWT(eq("goodUsername"), eq("goodPassword"), anyString());
	verifyNoMoreInteractions(this.mockClient);
}