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;
13 import org.junit.Test;
15 public class ValueTypeTest {
18 public void testGetSerializableType() {
19 byte[] bytes = new byte[10];
23 ValueType serializableType = ValueType.getSerializableType(bytes);
24 assertEquals(ValueType.BINARY_TYPE, serializableType);
28 public void testNullType() {
29 ValueType serializableType = ValueType.getSerializableType(null);
30 assertEquals(ValueType.NULL_TYPE, serializableType);
32 assertEquals(null, ValueType.NULL_TYPE.deserialize(""));