class AccountService {

	public Integer saveAccount(Account accountRequest) {

		logger.debug("AccountService.saveAccount:" + accountRequest.toString());
		// need to set some stuff that cannot be null!
		

		Account account = accounts.save(accountRequest);
		logger.info("AccountService.saveAccount: account saved: " + account);
		return account.getId();
	}

}

class AccountServiceTest {

	 MockMvc mockMvc;
	@InjectMocks AccountService service;
	@Mock AccountRepository repo;

	@Test
	public void saveAccount() {

		Account acc = ServiceTestConfiguration.account();
		when(repo.save(acc)).thenReturn(acc);
		assertEquals(service.saveAccount(acc),acc.getId());
	}

}