280N/A/*
280N/A * CDDL HEADER START
280N/A *
280N/A * The contents of this file are subject to the terms of the
280N/A * Common Development and Distribution License, Version 1.0 only
280N/A * (the "License"). You may not use this file except in compliance
280N/A * with the License.
280N/A *
6982N/A * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6982N/A * or http://forgerock.org/license/CDDLv1.0.html.
280N/A * See the License for the specific language governing permissions
280N/A * and limitations under the License.
280N/A *
280N/A * When distributing Covered Code, include this CDDL HEADER in each
6982N/A * file and include the License file at legal-notices/CDDLv1_0.txt.
6982N/A * If applicable, add the following below this CDDL HEADER, with the
6982N/A * fields enclosed by brackets "[]" replaced with your own identifying
6982N/A * information:
280N/A * Portions Copyright [yyyy] [name of copyright owner]
280N/A *
280N/A * CDDL HEADER END
280N/A *
280N/A *
3232N/A * Copyright 2006-2008 Sun Microsystems, Inc.
280N/A */
280N/Apackage org.opends.server.protocols.ldap;
280N/A
4134N/Aimport org.opends.server.protocols.asn1.ASN1Writer;
4134N/Aimport org.opends.server.protocols.asn1.ASN1;
4134N/Aimport org.opends.server.protocols.asn1.ASN1Reader;
4134N/Aimport org.opends.server.types.ByteStringBuilder;
280N/Aimport org.testng.annotations.Test;
280N/Aimport static org.testng.Assert.*;
280N/A
280N/A
280N/Apublic class TestUnbindRequestProtocolOp extends LdapTestCase {
280N/A
280N/A @Test()
284N/A public void testUnbindEncodeDecodeRequest() throws Exception {
4134N/A ByteStringBuilder builder = new ByteStringBuilder();
4134N/A ASN1Writer writer = ASN1.getWriter(builder);
280N/A UnbindRequestProtocolOp req = new UnbindRequestProtocolOp();
4134N/A req.write(writer);
4134N/A ASN1Reader reader = ASN1.getReader(builder.toByteString());
4134N/A ProtocolOp reqOp = LDAPReader.readProtocolOp(reader);
280N/A assertTrue(reqOp.getProtocolOpName() == req.getProtocolOpName());
280N/A assertTrue(reqOp.getType() == req.getType());
280N/A }
280N/A
280N/A @Test ()
280N/A public void testUnbindRequestToString() throws Exception
280N/A {
280N/A UnbindRequestProtocolOp r =
280N/A new UnbindRequestProtocolOp();
284N/A toString(r);
280N/A }
280N/A}