2 * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.cluster.datastore.node.utils.serialization;
11 import static org.junit.Assert.assertEquals;
12 import org.junit.Test;
14 public class ValueTypeTest {
17 public void testGetSerializableType(){
18 byte[] b = new byte[10];
22 ValueType serializableType = ValueType.getSerializableType(b);
23 assertEquals(ValueType.BINARY_TYPE, serializableType);
27 public void testNullType(){
28 ValueType serializableType = ValueType.getSerializableType(null);
29 assertEquals(ValueType.NULL_TYPE, serializableType);
31 assertEquals(null, ValueType.NULL_TYPE.deserialize(""));