	@Test(expected = IllegalArgumentException.class)
	public void heartMode_clientcreds_invalidGrants() {

		Mockito.when(config.isHeartMode()).thenReturn(true);

		ClientDetailsEntity client = new ClientDetailsEntity();
		Set<String> grantTypes = new LinkedHashSet<>();
		grantTypes.add("client_credentials");
		grantTypes.add("authorization_code");
		grantTypes.add("implicit");
		client.setGrantTypes(grantTypes);

		client.setTokenEndpointAuthMethod(AuthMethod.PRIVATE_KEY);

		client.setJwksUri("https://foo.bar/jwks");

		service.saveNewClient(client);

	}