Skip to main content
Glama
LeftPadUtilsTest.java1.37 kB
package org.example; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; public class LeftPadUtilsTest { @Test public void testNullInput() { assertNull(LeftPadUtils.leftPad(null, 5, "x")); } @Test public void testNoPaddingNeeded() { String s = "hello"; assertEquals("hello", LeftPadUtils.leftPad(s, 3, " ")); } @Test public void testPadEqualLength() { String s = "bob"; assertEquals("---bob", LeftPadUtils.leftPad(s, 6, "---")); } @Test public void testPadLessThanPadLen() { String s = "x"; assertEquals("abx", LeftPadUtils.leftPad(s, 3, "abcd")); } @Test public void testPadGreaterThanPadLen() { String s = "A"; assertEquals("01010A", LeftPadUtils.leftPad(s, 6, "01")); } @Test public void testEmptyPadUsesSpace() { String s = "z"; assertEquals(" z", LeftPadUtils.leftPad(s, 3, "")); } @Test public void testPrivateConstructorCovered() throws Exception { var ctor = LeftPadUtils.class.getDeclaredConstructor(); ctor.setAccessible(true); try { ctor.newInstance(); } catch (Throwable ignored) { // constructor throws AssertionError by design; invocation covers constructor for coverage } } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/amyfan7/se333-final-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server