// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static Matcher<RequestSocketData> address(Matcher<String> addressMatcher)
// {
// 	return new CombinableMatcher<RequestSocketData>(new AddressMatcher(addressMatcher));
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static SocketData data(byte[] data)
// {
// 	return new DefaultSocketData(data);
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static SocketData emptyResponse()
// {
// 	return new DefaultSocketData(new byte[0]);
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static UniversalMockRecorder expectCall() {
// 	return StaticConnectionFactory.expectCall();
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static List<RequestSocketData> recordedConnections()
// {
// 	return StaticConnectionFactory.getRequestRecorder().requestData();
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static void reset()
// {
// 	StaticConnectionFactory.reset();
// }


import org.junit.After;
import org.junit.Test;
import static net.javacrumbs.mocksocket.MockSocket.address;
import static net.javacrumbs.mocksocket.MockSocket.data;
import static net.javacrumbs.mocksocket.MockSocket.emptyResponse;
import static net.javacrumbs.mocksocket.MockSocket.expectCall;
import static net.javacrumbs.mocksocket.MockSocket.recordedConnections;
import static net.javacrumbs.mocksocket.MockSocket.reset;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import java.net.Socket;
import javax.net.SocketFactory;
import org.apache.commons.io.IOUtils;
/*
 * Copyright 2005-2010 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package net.javacrumbs.mocksocket;





public class SampleTest {

	@Test
	public void testResponse() throws Exception
	{
		byte[] mockData = new byte[]{1,2,3,4};
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static Matcher<RequestSocketData> address(Matcher<String> addressMatcher)
// {
// 	return new CombinableMatcher<RequestSocketData>(new AddressMatcher(addressMatcher));
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static SocketData data(byte[] data)
// {
// 	return new DefaultSocketData(data);
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static SocketData emptyResponse()
// {
// 	return new DefaultSocketData(new byte[0]);
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static UniversalMockRecorder expectCall() {
// 	return StaticConnectionFactory.expectCall();
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static List<RequestSocketData> recordedConnections()
// {
// 	return StaticConnectionFactory.getRequestRecorder().requestData();
// }
// 
// Path: core/src/main/java/net/javacrumbs/mocksocket/MockSocket.java
// public static void reset()
// {
// 	StaticConnectionFactory.reset();
// }


// Path: core/src/test/java/net/javacrumbs/mocksocket/SampleTest.java
import org.junit.After;
import org.junit.Test;
import static net.javacrumbs.mocksocket.MockSocket.address;
import static net.javacrumbs.mocksocket.MockSocket.data;
import static net.javacrumbs.mocksocket.MockSocket.emptyResponse;
import static net.javacrumbs.mocksocket.MockSocket.expectCall;
import static net.javacrumbs.mocksocket.MockSocket.recordedConnections;
import static net.javacrumbs.mocksocket.MockSocket.reset;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import java.net.Socket;
import javax.net.SocketFactory;
import org.apache.commons.io.IOUtils;

/*
 * Copyright 2005-2010 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package net.javacrumbs.mocksocket;





public class SampleTest {

	@Test
	public void testResponse() throws Exception
	{
		byte[] mockData = new byte[]{1,2,3,4};
		expectCall().andReturn(data(mockData));