2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. 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
8 package org.opendaylight.yangtools.concepts;
10 import static org.junit.Assert.assertThrows;
12 import org.junit.Test;
14 @Deprecated(since = "8.0.0", forRemoval = true)
15 public class AbstractIllegalArgumentCodecTest {
16 private static final class TestCodec extends AbstractIllegalArgumentCodec<String, String> {
18 protected String deserializeImpl(final String product) {
19 throw new AssertionError("Should never be invoked");
23 protected String serializeImpl(final String input) {
24 throw new AssertionError("Should never be invoked");
28 private final TestCodec codec = new TestCodec();
31 public void testNullDeserialize() {
32 assertThrows(NullPointerException.class, () -> codec.deserialize(null));
36 public void testNullSerialize() {
37 assertThrows(NullPointerException.class, () -> codec.serialize(null));