diff --git a/headless-services/commons/commons-java/src/test/java/org/springframework/ide/vscode/commons/java/JavaUtilsTest.java b/headless-services/commons/commons-java/src/test/java/org/springframework/ide/vscode/commons/java/JavaUtilsTest.java new file mode 100644 index 000000000..dbcbdee3d --- /dev/null +++ b/headless-services/commons/commons-java/src/test/java/org/springframework/ide/vscode/commons/java/JavaUtilsTest.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2024 Broadcom, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Broadcom, Inc. - initial API and implementation + *******************************************************************************/ +package org.springframework.ide.vscode.commons.java; + + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public class JavaUtilsTest { + + @Test + void toBindingKey() { + assertEquals("org.foo.bar.A", JavaUtils.typeBindingKeyToFqName("Lorg/foo/bar/A;")); + } + + @Test + void toFqn() { + assertEquals("Lorg/foo/bar/A;", JavaUtils.typeFqNameToBindingKey("org.foo.bar.A")); + } + +}