2 * Copyright (c) 2016 Red Hat, 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
8 package org.opendaylight.yangtools.testutils.mockito.tests;
10 import static com.google.common.truth.Truth.assertThat;
12 import java.lang.reflect.Method;
13 import org.junit.Test;
14 import org.opendaylight.yangtools.testutils.mockito.MethodExtensions;
16 public class MethodExtensionsTest {
18 public <T> void fooBar(int index, T element) {
22 public void betterToString() throws Exception {
23 Method method = MethodExtensionsTest.class.getMethod("fooBar", Integer.TYPE, Object.class);
24 assertThat(MethodExtensions.toString(method)).isEqualTo("fooBar(int index, T element)");