.andExpect(MockMvcResultMatchers.jsonPath("errors[0].message", Matchers.equalTo("may not be empty")));
}
@Test
public void signupFromApi_mismatchedEmails() throws Exception {
AccountRepository accountRepository = mock(AccountRepository.class);
when(accountRepository.createAccount(any(Person.class))).thenThrow(new EmailAlreadyOnFileException("roy@clarkson.com"));
SignedUpGateway gateway = mock(SignedUpGateway.class);
SignupController signupController = new SignupController(accountRepository, gateway);
String signupJson = "{\"first-name\":\"Roy\",\"last-name\":\"Clarkson\",\"email\":\"roy@clarkson.com\",\"confirm-email\":\"rclarkson@vmware.com\",\"gender\":\"M\",\"birthdate\":{\"month\":7,\"day\":8,\"year\":1976},\"password\":\"letmein\"}";
MockMvc mockMvc = standaloneSetup(signupController).build();