@Override
	public WhitelistedSite update(WhitelistedSite oldWhitelistedSite, WhitelistedSite whitelistedSite) {
		if (oldWhitelistedSite == null || whitelistedSite == null) {
			throw new IllegalArgumentException("Neither the old or new sites may be null");
		}
		return repository.update(oldWhitelistedSite, whitelistedSite);
	}
@Test
	public void update_nullSites() {

		WhitelistedSite oldSite = Mockito.mock(WhitelistedSite.class);
		WhitelistedSite newSite = Mockito.mock(WhitelistedSite.class);

		// old client null
		try {
			service.update(null, newSite);
			fail("Old site input is null. Expected a IllegalArgumentException.");
		} catch (IllegalArgumentException e) {
			assertThat(e, is(notNullValue()));
		}

		// new client null
		try {
			service.update(oldSite, null);
			fail("New site input is null. Expected a IllegalArgumentException.");
		} catch (IllegalArgumentException e) {
			assertThat(e, is(notNullValue()));
		}

		// both clients null
		try {
			service.update(null, null);
			fail("Both site inputs are null. Expected a IllegalArgumentException.");
		} catch (IllegalArgumentException e) {
			assertThat(e, is(notNullValue()));
		}
	}