<commit_before>package org.sagebionetworks.web.unitclient;

import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

import org.junit.Before;
import org.junit.Test;
import org.sagebionetworks.web.client.ClientLoggerImpl;
import org.sagebionetworks.web.client.SynapseClientAsync;
import org.sagebionetworks.web.shared.exceptions.ConflictException;

import com.google.gwt.user.client.rpc.AsyncCallback;


public class ClientLoggerImplTest {

	ClientLoggerImpl clientLogger;
	SynapseClientAsync mockSynapseClient;
	
	@Before
	public void setUp() throws Exception {
		mockSynapseClient = mock(SynapseClientAsync.class);
		clientLogger = new ClientLoggerImpl(mockSynapseClient);
	}

	@Test
	public void testErrorToRepositoryServices() {
		String exceptionMessage = "syn1234";
		ConflictException e = new ConflictException(exceptionMessage);
		String errorMessage = "Unable to upload a file for some specific reason.";
		clientLogger.errorToRepositoryServices(errorMessage, e);
		
		verify(mockSynapseClient).logErrorToRepositoryServices(eq(errorMessage), null, eq(exceptionMessage), eq(e.getStackTrace()), any(AsyncCallback.class));
	}
	

}<commit_msg>and fix client logger test to include exception class name<commit_after>package org.sagebionetworks.web.unitclient;

import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

import org.junit.Before;
import org.junit.Test;
import org.sagebionetworks.web.client.ClientLoggerImpl;
import org.sagebionetworks.web.client.SynapseClientAsync;
import org.sagebionetworks.web.shared.exceptions.ConflictException;

import com.google.gwt.user.client.rpc.AsyncCallback;


public class ClientLoggerImplTest {

	ClientLoggerImpl clientLogger;
	SynapseClientAsync mockSynapseClient;
	
	@Before
	public void setUp() throws Exception {
		mockSynapseClient = mock(SynapseClientAsync.class);
		clientLogger = new ClientLoggerImpl(mockSynapseClient);
	}

	@Test
	public void testErrorToRepositoryServices() {
		String exceptionMessage = "syn1234";
		ConflictException e = new ConflictException(exceptionMessage);
		String errorMessage = "Unable to upload a file for some specific reason.";
		clientLogger.errorToRepositoryServices(errorMessage, e);
		
		verify(mockSynapseClient).logErrorToRepositoryServices(eq(errorMessage), eq(e.getClass().getSimpleName()), eq(exceptionMessage), eq(e.getStackTrace()), any(AsyncCallback.class));
	}
	

}
{'fraction_non_alphanumeric': 0.09235545207605743, 'fraction_numerical': 0.0031043849437330227, 'mean_word_length': 6.58235294117647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6891540', 'n_tokens_mistral': 808, 'n_tokens_neox': 747, 'n_words': 155}