<commit_before>package com.auth0.jwt;

import static org.junit.Assert.*;
import com.auth0.jwt.impl.BasicPayloadHandler;
import com.auth0.jwt.impl.JwtProxyImpl;
import org.junit.Test;

/**
 * Test harness for JwtProxy
 */
public class TestHarness {

	@Test
	public void testHarness() throws Exception {
		
		final String secret = "This is a secret";
		final Algorithm algorithm = Algorithm.HS256;
		
		User user = new User();
		user.setUsername("jwt");
		user.setPassword("<PASSWORD>");
		
		JwtProxy proxy = new JwtProxyImpl();
		proxy.setPayloadHandler(new BasicPayloadHandler());
		
		ClaimSet claimSet = new ClaimSet();
		claimSet.setExp(24 * 60 * 60); // expire in 24 hours
		String token = proxy.encode(algorithm, user, secret, claimSet);
		
		Object payload = proxy.decode(algorithm, token, secret);
		assertEquals("{\"username\":\"jwt\",\"password\":\"<PASSWORD>\"}",payload);
	}
}<commit_msg>Changing tabs to spaces.<commit_after>package com.auth0.jwt;

import static org.junit.Assert.*;
import com.auth0.jwt.impl.BasicPayloadHandler;
import com.auth0.jwt.impl.JwtProxyImpl;
import org.junit.Test;

/**
 * Test harness for JwtProxy
 */
public class TestHarness {

  @Test
  public void testHarness() throws Exception {

    final String secret = "This is a secret";
    final Algorithm algorithm = Algorithm.HS256;

    User user = new User();
    user.setUsername("jwt");
    user.setPassword("<PASSWORD>");

    JwtProxy proxy = new JwtProxyImpl();
    proxy.setPayloadHandler(new BasicPayloadHandler());

    ClaimSet claimSet = new ClaimSet();
    claimSet.setExp(24 * 60 * 60); // expire in 24 hours
    String token = proxy.encode(algorithm, user, secret, claimSet);

    Object payload = proxy.decode(algorithm, token, secret);
    assertEquals("{\"username\":\"jwt\",\"password\":\"<PASSWORD>\"}",payload);
  }
}
{'fraction_non_alphanumeric': 0.14059080962800874, 'fraction_numerical': 0.015317286652078774, 'mean_word_length': 4.137640449438202, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5553932', 'n_tokens_mistral': 615, 'n_tokens_neox': 549, 'n_words': 143}