// Path: src/main/java/de/zh32/teleportsigns/DataContainer.java
// @Getter
// public class DataContainer {
// 
// 	private TeleportSignStorage storage;
// 
// 	private final ConfigurationAdapter configuration;
// 
// 	private List<TeleportSign> teleportSigns;
// 
// 	private List<SignLayout> layouts;
// 
// 	private List<GameServer> servers;
// 
// 	public DataContainer(ConfigurationAdapter configuration) {
// 		this.configuration = configuration;
// 	}
// 
// 	public void initialize() {
// 		layouts = configuration.loadLayouts();
// 		servers = configuration.loadServers();
// 		storage = new TeleportSignSQLiteStorage(configuration.getDatabasePath(), this);
// 		storage.initialize();
// 		teleportSigns = storage.loadAll();
// 
// 	}
// 
// 	public TeleportSign signAtLocation(TeleportSign.TeleportSignLocation location) {
// 		for (TeleportSign sign : teleportSigns) {
// 			if (sign.getLocation().equals(location)) {
// 				return sign;
// 			}
// 		}
// 		return null;
// 	}
// 
// 	public SignLayout layoutByName(String content) {
// 		for (SignLayout layout : layouts) {
// 			if (layout.getName().equals(content)) {
// 				return layout;
// 			}
// 		}
// 		return null;
// 	}
// 
// 	public GameServer serverByName(String content) {
// 		for (GameServer server : servers) {
// 			if (server.getName().equals(content)) {
// 				return server;
// 			}
// 		}
// 		return null;
// 	}
// 
// }
// 
// Path: src/test/java/de/zh32/teleportsigns/TestLayout.java
// public class TestLayout implements SignLayout {
// 
// 	@Override
// 	public boolean isTeleport() {
// 		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
// 	}
// 
// 	@Override
// 	public String[] renderLayoutFor(GameServer sinfo) {
// 		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
// 	}
// 
// 	@Override
// 	public String getName() {
// 		return "default";
// 	}
// 
// }
// 
// Path: src/main/java/de/zh32/teleportsigns/server/GameServer.java
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode
// public class GameServer implements Cloneable {
// 	private String name;
// 	private int playersOnline = 0;
// 	private int maxPlayers = 0;
// 	private String motd;
// 	private boolean online = false;
// 	private InetSocketAddress address;
// 	private String displayname;
// 
// 	@Override
// 	public GameServer clone() {
// 		try {
// 			return (GameServer) super.clone();
// 		} catch (CloneNotSupportedException e) {
// 			throw new InternalError();
// 		}
// 	}
// }
// 
// Path: src/main/java/de/zh32/teleportsigns/sign/TeleportSign.java
// @Data
// @Accessors(chain = true)
// @AllArgsConstructor
// @EqualsAndHashCode
// public static class TeleportSignLocation {
// 	private int x;
// 	private int y;
// 	private int z;
// 	private String worldName;
// }
// 
// Path: src/main/java/de/zh32/teleportsigns/storage/TeleportSignStorage.java
// public interface TeleportSignStorage {
// 	List<TeleportSign> loadAll();
// 
// 	void save(TeleportSign teleportSign);
// 
// 	void delete(TeleportSign teleportSign);
// 
// 	public void initialize();
// }


import de.zh32.teleportsigns.DataContainer;
import de.zh32.teleportsigns.TestLayout;
import de.zh32.teleportsigns.server.GameServer;
import de.zh32.teleportsigns.sign.TeleportSign.TeleportSignLocation;
import de.zh32.teleportsigns.storage.TeleportSignStorage;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static org.hamcrest.Matchers.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
package de.zh32.teleportsigns.sign;



/**
 * @author zh32
 */
public class SignCreatorTest {

	private SignCreator testee;
	private DataContainer plugin;
	private TeleportSignLocation location;

	@Before
	public void setup() {
		plugin = mock(DataContainer.class);
		when(plugin.layoutByName("default")).thenReturn(new TestLayout());
		when(plugin.serverByName("testserver")).thenReturn(new GameServer().setName("testserver"));
		when(plugin.getStorage()).thenReturn(mock(TeleportSignStorage.class));
		testee = new SignCreator(plugin);
		location = new TeleportSign.TeleportSignLocation(1, 1, 1, "world");
	}

	@Test
// Path: src/main/java/de/zh32/teleportsigns/DataContainer.java
// @Getter
// public class DataContainer {
// 
// 	private TeleportSignStorage storage;
// 
// 	private final ConfigurationAdapter configuration;
// 
// 	private List<TeleportSign> teleportSigns;
// 
// 	private List<SignLayout> layouts;
// 
// 	private List<GameServer> servers;
// 
// 	public DataContainer(ConfigurationAdapter configuration) {
// 		this.configuration = configuration;
// 	}
// 
// 	public void initialize() {
// 		layouts = configuration.loadLayouts();
// 		servers = configuration.loadServers();
// 		storage = new TeleportSignSQLiteStorage(configuration.getDatabasePath(), this);
// 		storage.initialize();
// 		teleportSigns = storage.loadAll();
// 
// 	}
// 
// 	public TeleportSign signAtLocation(TeleportSign.TeleportSignLocation location) {
// 		for (TeleportSign sign : teleportSigns) {
// 			if (sign.getLocation().equals(location)) {
// 				return sign;
// 			}
// 		}
// 		return null;
// 	}
// 
// 	public SignLayout layoutByName(String content) {
// 		for (SignLayout layout : layouts) {
// 			if (layout.getName().equals(content)) {
// 				return layout;
// 			}
// 		}
// 		return null;
// 	}
// 
// 	public GameServer serverByName(String content) {
// 		for (GameServer server : servers) {
// 			if (server.getName().equals(content)) {
// 				return server;
// 			}
// 		}
// 		return null;
// 	}
// 
// }
// 
// Path: src/test/java/de/zh32/teleportsigns/TestLayout.java
// public class TestLayout implements SignLayout {
// 
// 	@Override
// 	public boolean isTeleport() {
// 		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
// 	}
// 
// 	@Override
// 	public String[] renderLayoutFor(GameServer sinfo) {
// 		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
// 	}
// 
// 	@Override
// 	public String getName() {
// 		return "default";
// 	}
// 
// }
// 
// Path: src/main/java/de/zh32/teleportsigns/server/GameServer.java
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode
// public class GameServer implements Cloneable {
// 	private String name;
// 	private int playersOnline = 0;
// 	private int maxPlayers = 0;
// 	private String motd;
// 	private boolean online = false;
// 	private InetSocketAddress address;
// 	private String displayname;
// 
// 	@Override
// 	public GameServer clone() {
// 		try {
// 			return (GameServer) super.clone();
// 		} catch (CloneNotSupportedException e) {
// 			throw new InternalError();
// 		}
// 	}
// }
// 
// Path: src/main/java/de/zh32/teleportsigns/sign/TeleportSign.java
// @Data
// @Accessors(chain = true)
// @AllArgsConstructor
// @EqualsAndHashCode
// public static class TeleportSignLocation {
// 	private int x;
// 	private int y;
// 	private int z;
// 	private String worldName;
// }
// 
// Path: src/main/java/de/zh32/teleportsigns/storage/TeleportSignStorage.java
// public interface TeleportSignStorage {
// 	List<TeleportSign> loadAll();
// 
// 	void save(TeleportSign teleportSign);
// 
// 	void delete(TeleportSign teleportSign);
// 
// 	public void initialize();
// }


// Path: src/test/java/de/zh32/teleportsigns/sign/SignCreatorTest.java
import de.zh32.teleportsigns.DataContainer;
import de.zh32.teleportsigns.TestLayout;
import de.zh32.teleportsigns.server.GameServer;
import de.zh32.teleportsigns.sign.TeleportSign.TeleportSignLocation;
import de.zh32.teleportsigns.storage.TeleportSignStorage;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static org.hamcrest.Matchers.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

package de.zh32.teleportsigns.sign;



/**
 * @author zh32
 */
public class SignCreatorTest {

	private SignCreator testee;
	private DataContainer plugin;
	private TeleportSignLocation location;

	@Before
	public void setup() {
		plugin = mock(DataContainer.class);
		when(plugin.layoutByName("default")).thenReturn(new TestLayout());
		when(plugin.serverByName("testserver")).thenReturn(new GameServer().setName("testserver"));
		when(plugin.getStorage()).thenReturn(mock(TeleportSignStorage.class));
		testee = new SignCreator(plugin);
		location = new TeleportSign.TeleportSignLocation(1, 1, 1, "world");
	}

	@Test
	public void can_create_sign() throws SignCreator.TeleportSignCreationException {