// Path: src/main/java/se/gustavkarlsson/rocketchat/jira_trigger/configuration/RocketChatConfiguration.java
// static final String TOKENS_KEY = KEY_PREFIX + "tokens";


import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import static org.mockito.Mockito.when;
import static se.gustavkarlsson.rocketchat.jira_trigger.configuration.RocketChatConfiguration.TOKENS_KEY;
package se.gustavkarlsson.rocketchat.jira_trigger.configuration;



@RunWith(MockitoJUnitRunner.class)
public class RocketChatConfigurationTest {

	@Mock
	private ConfigMap mockConfigMap;

	@Test(expected = NullPointerException.class)
	public void createWithNullConfigMapThrowsNPE() throws Exception {
		new RocketChatConfiguration(null);
	}

	@Test(expected = ValidationException.class)
	public void createWithNullTokensConfigMapThrowsValidationException() throws Exception {
// Path: src/main/java/se/gustavkarlsson/rocketchat/jira_trigger/configuration/RocketChatConfiguration.java
// static final String TOKENS_KEY = KEY_PREFIX + "tokens";


// Path: src/test/java/se/gustavkarlsson/rocketchat/jira_trigger/configuration/RocketChatConfigurationTest.java
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import static org.mockito.Mockito.when;
import static se.gustavkarlsson.rocketchat.jira_trigger.configuration.RocketChatConfiguration.TOKENS_KEY;

package se.gustavkarlsson.rocketchat.jira_trigger.configuration;



@RunWith(MockitoJUnitRunner.class)
public class RocketChatConfigurationTest {

	@Mock
	private ConfigMap mockConfigMap;

	@Test(expected = NullPointerException.class)
	public void createWithNullConfigMapThrowsNPE() throws Exception {
		new RocketChatConfiguration(null);
	}

	@Test(expected = ValidationException.class)
	public void createWithNullTokensConfigMapThrowsValidationException() throws Exception {
		when(mockConfigMap.getStringList(TOKENS_KEY)).thenReturn(null);