// Path: biller-simulator-gateway-pln/src/main/java/com/artivisi/biller/simulator/gateway/pln/constants/MTIConstants.java
// public abstract class MTIConstants {
// 	public static final String NETWORK_MANAGEMENT_REQUEST = "0800";
// 	public static final String NETWORK_MANAGEMENT_RESPONSE = "0810";
// 	public static final String INQUIRY_REQUEST = "0100";
// 	public static final String INQUIRY_RESPONSE = "0110";
// 	public static final String PAYMENT_REQUEST = "0200";
// 	public static final String PAYMENT_RESPONSE = "0210";
// 	public static final String REVERSAL_REQUEST = "0400";
// 	public static final String REVERSAL_RESPONSE = "0410";
// 	public static final String REVERSAL_REPEAT_REQUEST = "0401";
// 	public static final String REVERSAL_REPEAT_RESPONSE = "0411";
// }
// 
// Path: biller-simulator-gateway-pln/src/main/java/com/artivisi/biller/simulator/gateway/pln/jpos/PlnChannel.java
// public class PlnChannel  extends BaseChannel {
// 	private static final int MAX_MSG_LENGTH = 4096;
// 	private static final int MSG_TRAILER = 255;
// 
// 	@Override
// 	protected void sendMessageTrailler(ISOMsg m, int len) throws IOException {
// 		serverOut.write(MSG_TRAILER);
// 	}
// 
// 	@Override
// 	protected byte[] streamReceive() throws IOException {
// 		byte[] buf = new byte[MAX_MSG_LENGTH];
// 		int len = 0;
// 		for (len = 0; len < MAX_MSG_LENGTH; len++) {
// 			int data = serverIn.read();
// 			if (data == MSG_TRAILER) {
// 				break;
// 			}
// 			buf[len] = (byte) data;
// 		}
// 		if (len == MAX_MSG_LENGTH) {
// 			throw new IOException("packet too long");
// 		}
// 
// 		byte[] d = new byte[len];
// 		System.arraycopy(buf, 0, d, 0, len);
// 		return d;
// 	}
// 
// 	@Override
// 	public ISOMsg receive() throws IOException, ISOException {
// 		try {
// 			return super.receive();
// 		} catch (SocketTimeoutException err) {
// 			// tidak dapat response sampai timeout, gpp return null saja
// 			return null;
// 		}
// 	}
// 
// 	// constructor default override
// 	public PlnChannel(ISOPackager p, ServerSocket serverSocket)
// 			throws IOException {
// 		super(p, serverSocket);
// 	}
// 
// 	public PlnChannel(ISOPackager p) throws IOException {
// 		super(p);
// 	}
// 
// 	public PlnChannel(String host, int port, ISOPackager p) {
// 		super(host, port, p);
// 	}
// 
// 	public PlnChannel() {
// 	}
// }


import static org.junit.Assert.assertEquals;
import org.jpos.iso.ISOMsg;
import org.junit.Test;
import com.artivisi.biller.simulator.gateway.pln.constants.MTIConstants;
import com.artivisi.biller.simulator.gateway.pln.jpos.PlnChannel;
/**
 * Copyright (C) 2011 ArtiVisi Intermedia <info@artivisi.com>
 *
 * 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 com.artivisi.ppob.simulator.gateway.pln;





public class NetworkManagementTest extends BaseTest {
	
	
	@Test
	public void testSignon() throws Exception {
		ISOMsg msg = new ISOMsg();
// Path: biller-simulator-gateway-pln/src/main/java/com/artivisi/biller/simulator/gateway/pln/constants/MTIConstants.java
// public abstract class MTIConstants {
// 	public static final String NETWORK_MANAGEMENT_REQUEST = "0800";
// 	public static final String NETWORK_MANAGEMENT_RESPONSE = "0810";
// 	public static final String INQUIRY_REQUEST = "0100";
// 	public static final String INQUIRY_RESPONSE = "0110";
// 	public static final String PAYMENT_REQUEST = "0200";
// 	public static final String PAYMENT_RESPONSE = "0210";
// 	public static final String REVERSAL_REQUEST = "0400";
// 	public static final String REVERSAL_RESPONSE = "0410";
// 	public static final String REVERSAL_REPEAT_REQUEST = "0401";
// 	public static final String REVERSAL_REPEAT_RESPONSE = "0411";
// }
// 
// Path: biller-simulator-gateway-pln/src/main/java/com/artivisi/biller/simulator/gateway/pln/jpos/PlnChannel.java
// public class PlnChannel  extends BaseChannel {
// 	private static final int MAX_MSG_LENGTH = 4096;
// 	private static final int MSG_TRAILER = 255;
// 
// 	@Override
// 	protected void sendMessageTrailler(ISOMsg m, int len) throws IOException {
// 		serverOut.write(MSG_TRAILER);
// 	}
// 
// 	@Override
// 	protected byte[] streamReceive() throws IOException {
// 		byte[] buf = new byte[MAX_MSG_LENGTH];
// 		int len = 0;
// 		for (len = 0; len < MAX_MSG_LENGTH; len++) {
// 			int data = serverIn.read();
// 			if (data == MSG_TRAILER) {
// 				break;
// 			}
// 			buf[len] = (byte) data;
// 		}
// 		if (len == MAX_MSG_LENGTH) {
// 			throw new IOException("packet too long");
// 		}
// 
// 		byte[] d = new byte[len];
// 		System.arraycopy(buf, 0, d, 0, len);
// 		return d;
// 	}
// 
// 	@Override
// 	public ISOMsg receive() throws IOException, ISOException {
// 		try {
// 			return super.receive();
// 		} catch (SocketTimeoutException err) {
// 			// tidak dapat response sampai timeout, gpp return null saja
// 			return null;
// 		}
// 	}
// 
// 	// constructor default override
// 	public PlnChannel(ISOPackager p, ServerSocket serverSocket)
// 			throws IOException {
// 		super(p, serverSocket);
// 	}
// 
// 	public PlnChannel(ISOPackager p) throws IOException {
// 		super(p);
// 	}
// 
// 	public PlnChannel(String host, int port, ISOPackager p) {
// 		super(host, port, p);
// 	}
// 
// 	public PlnChannel() {
// 	}
// }


// Path: biller-simulator-gateway-pln/src/test/java/com/artivisi/ppob/simulator/gateway/pln/NetworkManagementTest.java
import static org.junit.Assert.assertEquals;
import org.jpos.iso.ISOMsg;
import org.junit.Test;
import com.artivisi.biller.simulator.gateway.pln.constants.MTIConstants;
import com.artivisi.biller.simulator.gateway.pln.jpos.PlnChannel;

/**
 * Copyright (C) 2011 ArtiVisi Intermedia <info@artivisi.com>
 *
 * 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 com.artivisi.ppob.simulator.gateway.pln;





public class NetworkManagementTest extends BaseTest {
	
	
	@Test
	public void testSignon() throws Exception {
		ISOMsg msg = new ISOMsg();
		msg.setMTI(MTIConstants.NETWORK_MANAGEMENT_REQUEST);