Repository: SEMOSS/Semoss
Pull request #618: [#589] test(unit): added unit tests for prerna.engine.api package
Author: login: ericgonzal8
Created: 2025-03-24T15:51:33Z | Merged: 2025-03-25T19:34:51Z

## Description
Unit tests were created for prerna.engine.api package

## Changes Made
Unit tests added to:
 - FunctionTypeEnum.java
 - ModelTypeEnum.java
 - RemoteModelStateEnum.java
 - StorageTypeEnum.java
 - VectorDatabaseTypeEnum.java
 - VenvTypeEnum.java

## How to Test
In your local IDE
1. Navigate to prerna.unit.engine.api package
2. Right click -> run as -> junit test
3. All tests will run

## Notes
No other notes


Diff:
diff --git a/test/prerna/unit/engine/api/FunctionTypeEnumUnitTests.java b/test/prerna/unit/engine/api/FunctionTypeEnumUnitTests.java
new file mode 100644
index 00000000000..b80a044b61f
--- /dev/null
+++ b/test/prerna/unit/engine/api/FunctionTypeEnumUnitTests.java
@@ -0,0 +1,69 @@
+package prerna.unit.engine.api;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.junit.jupiter.api.Test;
+
+import prerna.engine.api.FunctionTypeEnum;
+import prerna.engine.impl.function.AWSTextractFunctionEngine;
+import prerna.engine.impl.function.AzureDocumentIntelligenceCustomEmbeddingsFuntionEngine;
+import prerna.engine.impl.function.ImageDescriptionFunctionEngine;
+import prerna.engine.impl.function.LocalPythonCustomEmbeddingsFunctionEngine;
+import prerna.engine.impl.function.LocalPythonFunctionEngine;
+import prerna.engine.impl.function.RESTFunctionEngine;
+
+public class FunctionTypeEnumUnitTests {
+	
+	@Test
+	void testAWSTextract() {
+		FunctionTypeEnum testEnum = FunctionTypeEnum.AWS_TEXTRACT;
+		assertEquals("AWS_TEXTRACT", testEnum.getFunctionName());
+		assertEquals(AWSTextractFunctionEngine.class.getName(), testEnum.getFunctionClass());
+	}
+
+	@Test
+	void testImageDescription() {
+		FunctionTypeEnum testEnum = FunctionTypeEnum.IMAGE_DESCRIPTION;
+		assertEquals("IMAGE_DESCRIPTION", testEnum.getFunctionName());
+		assertEquals(ImageDescriptionFunctionEngine.class.getName(), testEnum.getFunctionClass());
+	}
+	
+	@Test
+	void testLocalPython() {
+		FunctionTypeEnum testEnum = FunctionTypeEnum.LOCAL_PYTHON;
+		assertEquals("LOCAL_PYTHON", testEnum.getFunctionName());
+		assertEquals(LocalPythonFunctionEngine.class.getName(), testEnum.getFunctionClass());
+	}
+	
+	@Test
+	void testRest() {
+		FunctionTypeEnum testEnum = FunctionTypeEnum.REST;
+		assertEquals("REST", testEnum.getFunctionName());
+		assertEquals(RESTFunctionEngine.class.getName(), testEnum.getFunctionClass());
+	}
+	
+	@Test
+	void testAzure() {
+		FunctionTypeEnum testEnum = FunctionTypeEnum.AZURE_DOCUMENT_INTELLIGENCE_CUSTOM_EMBEDDINGS;
+		assertEquals("AZURE_DOCUMENT_INTELLIGENCE_CUSTOM_EMBEDDINGS", testEnum.getFunctionName());
+		assertEquals(AzureDocumentIntelligenceCustomEmbeddingsFuntionEngine.class.getName(), testEnum.getFunctionClass());
+	}
+	
+	@Test
+	void testCustomEmbeddings() {
+		FunctionTypeEnum testEnum = FunctionTypeEnum.LOCAL_PYTHON_CUSTOM_EMBEDDINGS;
+		assertEquals("LOCAL_PYTHON_CUSTOM_EMBEDDINGS", testEnum.getFunctionName());
+		assertEquals(LocalPythonCustomEmbeddingsFunctionEngine.class.getName(), testEnum.getFunctionClass());
+	}
+	
+	@Test
+	void testBadFunctionName() {
+		String badName = "NOT_A_REAL_FUNCTION";
+		Exception thrown = assertThrows(
+				IllegalArgumentException.class,
+				() -> FunctionTypeEnum.getEnumFromName(badName)
+				);
+		assertEquals("Invalid input for name " + badName, thrown.getMessage());
+	}
+}
diff --git a/test/prerna/unit/engine/api/ModelTypeEnumUnitTests.java b/test/prerna/unit/engine/api/ModelTypeEnumUnitTests.java
new file mode 100644
index 00000000000..0a8fd882f19
--- /dev/null
+++ b/test/prerna/unit/engine/api/ModelTypeEnumUnitTests.java
@@ -0,0 +1,102 @@
+package prerna.unit.engine.api;
+
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.junit.jupiter.api.Test;
+
+import prerna.engine.api.ModelTypeEnum;
+import prerna.engine.impl.model.BedrockEngine;
+import prerna.engine.impl.model.EmbeddedModelEngine;
+import prerna.engine.impl.model.KServeImageEmbedEngine;
+import prerna.engine.impl.model.KServeVisionEngine;
+import prerna.engine.impl.model.NEREngine;
+import prerna.engine.impl.model.OpenAiEngine;
+import prerna.engine.impl.model.TextEmbeddingsEngine;
+import prerna.engine.impl.model.TextGenerationEngine;
+import prerna.engine.impl.model.VertexEngine;
+import prerna.engine.impl.remotesemoss.RemoteModelEngine;
+
+public class ModelTypeEnumUnitTests {
+	
+	@Test
+	void testBedrock() {
+		ModelTypeEnum testEnum = ModelTypeEnum.BEDROCK;
+		assertEquals("BEDROCK", testEnum.getModelName());
+		assertEquals(BedrockEngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testEmbedded() {
+		ModelTypeEnum testEnum = ModelTypeEnum.EMBEDDED;
+		assertEquals("EMBEDDED", testEnum.getModelName());
+		assertEquals(EmbeddedModelEngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testNER() {
+		ModelTypeEnum testEnum = ModelTypeEnum.NER;
+		assertEquals("NER", testEnum.getModelName());
+		assertEquals(NEREngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testVision() {
+		ModelTypeEnum testEnum = ModelTypeEnum.KSERVE_VISION;
+		assertEquals("KSERVE_VISION", testEnum.getModelName());
+		assertEquals(KServeVisionEngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testImageEmbed() {
+		ModelTypeEnum testEnum = ModelTypeEnum.KSERVE_IMAGE_EMBED;
+		assertEquals("KSERVE_IMAGE_EMBED", testEnum.getModelName());
+		assertEquals(KServeImageEmbedEngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testOpenAI() {
+		ModelTypeEnum testEnum = ModelTypeEnum.OPEN_AI;
+		assertEquals("OPEN_AI", testEnum.getModelName());
+		assertEquals(OpenAiEngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testRemote() {
+		ModelTypeEnum testEnum = ModelTypeEnum.REMOTE;
+		assertEquals("REMOTE", testEnum.getModelName());
+		assertEquals(RemoteModelEngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testTextEmbed() {
+		ModelTypeEnum testEnum = ModelTypeEnum.TEXT_EMBEDDINGS;
+		assertEquals("TEXT_EMBEDDINGS", testEnum.getModelName());
+		assertEquals(TextEmbeddingsEngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testTextGen() {
+		ModelTypeEnum testEnum = ModelTypeEnum.TEXT_GENERATION;
+		assertEquals("TEXT_GENERATION", testEnum.getModelName());
+		assertEquals(TextGenerationEngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testVertex() {
+		ModelTypeEnum testEnum = ModelTypeEnum.VERTEX;
+		assertEquals("VERTEX", testEnum.getModelName());
+		assertEquals(VertexEngine.class.getName(), testEnum.getModelClass());
+	}
+	
+	@Test
+	void testBadFunctionName() {
+		String badName = "NOT_A_REAL_MODEL_TYPE";
+		Exception thrown = assertThrows(
+				IllegalArgumentException.class,
+				() -> ModelTypeEnum.getEnumFromName(badName)
+				);
+		assertEquals("Invalid input for name " + badName, thrown.getMessage());
+	}
+}
diff --git a/test/prerna/unit/engine/api/RemoteModelStateEnumUnitTests.java b/test/prerna/unit/engine/api/RemoteModelStateEnumUnitTests.java
new file mode 100644
index 00000000000..260690d4e0d
--- /dev/null
+++ b/test/prerna/unit/engine/api/RemoteModelStateEnumUnitTests.java
@@ -0,0 +1,38 @@
+package prerna.unit.engine.api;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Vector;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import prerna.engine.api.RemoteModelStateEnum;
+
+public class RemoteModelStateEnumUnitTests {
+	private RemoteModelStateEnum[] enumArr;
+	
+	@BeforeEach
+	void setUp() {
+		enumArr = RemoteModelStateEnum.values();
+	}
+	
+	@Test
+	void testAllEnumsExist() {
+		List<RemoteModelStateEnum> enumLst = Stream.of(
+				RemoteModelStateEnum.COLD,
+				RemoteModelStateEnum.WARMING,
+				RemoteModelStateEnum.ACTIVE,
+				RemoteModelStateEnum.FAILED,
+				RemoteModelStateEnum.UNKNOWN
+				).collect(Collectors.toCollection(Vector::new));
+		
+		assertTrue(CollectionUtils.containsAll(enumLst, Arrays.asList(enumArr)));
+	}
+	
+}
diff --git a/test/prerna/unit/engine/api/StorageTypeEnumUnitTests.java b/test/prerna/unit/engine/api/StorageTypeEnumUnitTests.java
new file mode 100644
index 00000000000..3e4fb243ba3
--- /dev/null
+++ b/test/prerna/unit/engine/api/StorageTypeEnumUnitTests.java
@@ -0,0 +1,93 @@
+package prerna.unit.engine.api;
+
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.junit.jupiter.api.Test;
+
+import prerna.engine.api.StorageTypeEnum;
+import prerna.engine.impl.storage.AzureBlobStorageEngine;
+import prerna.engine.impl.storage.CephStorageEngine;
+import prerna.engine.impl.storage.GoogleCloudStorageEngine;
+import prerna.engine.impl.storage.JCIFSStorageEngine;
+import prerna.engine.impl.storage.LocalFileSystemStorageEngine;
+import prerna.engine.impl.storage.MinioStorageEngine;
+import prerna.engine.impl.storage.S3StorageEngine;
+import prerna.engine.impl.storage.SFTPStorageEngine;
+
+public class StorageTypeEnumUnitTests {
+	
+	@Test
+	void testS3() {
+		StorageTypeEnum testEnum = StorageTypeEnum.AMAZON_S3;
+		assertEquals("AMAZON_S3", testEnum.getStorageName());
+		assertEquals(S3StorageEngine.class.getName(), testEnum.getStorageClass());
+	}
+	
+	@Test
+	void testCeph() {
+		StorageTypeEnum testEnum = StorageTypeEnum.CEPH;
+		assertEquals("CEPH", testEnum.getStorageName());
+		assertEquals(CephStorageEngine.class.getName(), testEnum.getStorageClass());
+	}
+	
+	@Test
+	void testGoogle() {
+		StorageTypeEnum testEnum = StorageTypeEnum.GOOGLE_CLOUD_STORAGE;
+		assertEquals("GOOGLE_CLOUD_STORAGE", testEnum.getStorageName());
+		assertEquals(GoogleCloudStorageEngine.class.getName(), testEnum.getStorageClass());
+	}
+	
+	@Test
+	void testJCIFS() {
+		StorageTypeEnum testEnum = StorageTypeEnum.JCIFS;
+		assertEquals("JCIFS", testEnum.getStorageName());
+		assertEquals(JCIFSStorageEngine.class.getName(), testEnum.getStorageClass());
+	}
+	
+	@Test
+	void testLocalFiles() {
+		StorageTypeEnum testEnum = StorageTypeEnum.LOCAL_FILE_SYSTEM;
+		assertEquals("LOCAL_FILE_SYSTEM", testEnum.getStorageName());
+		assertEquals(LocalFileSystemStorageEngine.class.getName(), testEnum.getStorageClass());
+	}
+	
+	@Test
+	void testMicrosoft() {
+		StorageTypeEnum testEnum = StorageTypeEnum.MICROSOFT_AZURE_BLOB_STORAGE;
+		assertEquals("MICROSOFT_AZURE_BLOB_STORAGE", testEnum.getStorageName());
+		assertEquals(AzureBlobStorageEngine.class.getName(), testEnum.getStorageClass());
+	}
+	
+	@Test
+	void testMinio() {
+		StorageTypeEnum testEnum = StorageTypeEnum.MINIO;
+		assertEquals("MINIO", testEnum.getStorageName());
+		assertEquals(MinioStorageEngine.class.getName(), testEnum.getStorageClass());
+	}
+	
+	@Test
+	void testSFTP() {
+		StorageTypeEnum testEnum = StorageTypeEnum.SFTP;
+		assertEquals("SFTP", testEnum.getStorageName());
+		assertEquals(SFTPStorageEngine.class.getName(), testEnum.getStorageClass());
+	}
+	
+	@Test
+	void testSMB() {
+		StorageTypeEnum testEnum = StorageTypeEnum.SMB_CIFS;
+		assertEquals("SMB_CIFS", testEnum.getStorageName());
+		assertEquals(JCIFSStorageEngine.class.getName(), testEnum.getStorageClass());
+	}
+	
+	@Test
+	void testBadFunctionName() {
+		String badName = "NOT_A_REAL_STORAGE_TYPE";
+		Exception thrown = assertThrows(
+				IllegalArgumentException.class,
+				() -> StorageTypeEnum.getEnumFromName(badName)
+				);
+		assertEquals("Invalid input for name " + badName, thrown.getMessage());
+	}
+}
diff --git a/test/prerna/unit/engine/api/VectorDatabaseTypeEnumUnitTests.java b/test/prerna/unit/engine/api/VectorDatabaseTypeEnumUnitTests.java
new file mode 100644
index 00000000000..cd4a7d19d85
--- /dev/null
+++ b/test/prerna/unit/engine/api/VectorDatabaseTypeEnumUnitTests.java
@@ -0,0 +1,100 @@
+package prerna.unit.engine.api;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.junit.jupiter.api.Test;
+
+import prerna.engine.api.VectorDatabaseTypeEnum;
+import prerna.engine.impl.vector.ChromaVectorDatabaseEngine;
+import prerna.engine.impl.vector.ElasticSearchRestVectorDatabaseEngine;
+import prerna.engine.impl.vector.FaissDatabaseEngine;
+import prerna.engine.impl.vector.OpenSearchRestVectorDatabaseEngine;
+import prerna.engine.impl.vector.PGVectorDatabaseEngine;
+import prerna.engine.impl.vector.PineConeVectorDatabaseEngine;
+import prerna.engine.impl.vector.WeaviateVectorDatabaseEngine;
+
+public class VectorDatabaseTypeEnumUnitTests {
+	
+	@Test
+	void testChroma() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.CHROMA;
+		assertEquals("CHROMA", testEnum.getVectorDatabaseName());
+		assertEquals(ChromaVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testFAISS() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.FAISS;
+		assertEquals("FAISS", testEnum.getVectorDatabaseName());
+		assertEquals(FaissDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testPG() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.PGVECTOR;
+		assertEquals("PGVECTOR", testEnum.getVectorDatabaseName());
+		assertEquals(PGVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testOpenSearch() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.OPEN_SEARCH;
+		assertEquals("OPEN_SEARCH", testEnum.getVectorDatabaseName());
+		assertEquals(OpenSearchRestVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testElasticSearch() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.ELASTIC_SEARCH;
+		assertEquals("ELASTIC_SEARCH", testEnum.getVectorDatabaseName());
+		assertEquals(ElasticSearchRestVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testWeaviate() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.WEAVIATE;
+		assertEquals("WEAVIATE", testEnum.getVectorDatabaseName());
+		assertEquals(WeaviateVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testPineCone() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.PINECONE;
+		assertEquals("PINECONE", testEnum.getVectorDatabaseName());
+		assertEquals(PineConeVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testBadVectorDatabaseName() {
+		String badName = "NOT_A_REAL_DATABASE";
+		Exception thrown = assertThrows(
+				IllegalArgumentException.class,
+				() -> VectorDatabaseTypeEnum.getEnumFromName(badName)
+				);
+		assertEquals("Invalid input for name " + badName, thrown.getMessage());
+	}
+	
+	@Test
+	void testBadVectorDatabaseClass() {
+		String badClass = "NOT_A_REAL_CLASS";
+		VectorDatabaseTypeEnum badEnum = VectorDatabaseTypeEnum.getEnumFromClass(badClass);
+		assertNull(badEnum);
+	}
+	
+	@Test
+	void testValidVectorDatabaseName() {
+		String validName = "PINECONE";
+		VectorDatabaseTypeEnum validEnum = VectorDatabaseTypeEnum.getEnumFromName(validName);
+		assertNotNull(validEnum);
+	}
+	
+	@Test
+	void testValidVectorDatabaseClass() {
+		String validClass = PineConeVectorDatabaseEngine.class.getName();
+		VectorDatabaseTypeEnum validEnum = VectorDatabaseTypeEnum.getEnumFromClass(validClass);
+		assertNotNull(validEnum);
+	}
+}
diff --git a/test/prerna/unit/engine/api/VenvTypeEnumUnitTests.java b/test/prerna/unit/engine/api/VenvTypeEnumUnitTests.java
new file mode 100644
index 00000000000..5ae66c55ae2
--- /dev/null
+++ b/test/prerna/unit/engine/api/VenvTypeEnumUnitTests.java
@@ -0,0 +1,30 @@
+package prerna.unit.engine.api;
+
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.junit.jupiter.api.Test;
+
+import prerna.engine.api.VenvTypeEnum;
+import prerna.engine.impl.venv.PythonVenvEngine;
+
+public class VenvTypeEnumUnitTests {
+
+	@Test
+	void testPython() {
+		VenvTypeEnum testEnum = VenvTypeEnum.PYTHON;
+		assertEquals("PYTHON", testEnum.getVenvName());
+		assertEquals(PythonVenvEngine.class.getName(), testEnum.getVenvClass());
+	}
+	
+	@Test
+	void testBadVectorDatabaseName() {
+		String badName = "NOT_A_REAL_VENV_TYPE";
+		Exception thrown = assertThrows(
+				IllegalArgumentException.class,
+				() -> VenvTypeEnum.getEnumFromName(badName)
+				);
+		assertEquals("Invalid input for name " + badName, thrown.getMessage());
+	}
+}


Reviews:
user: login: EJV20
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T15:59:17Z
user: login: EJV20
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T16:00:09Z
user: login: EJV20
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T16:00:24Z
user: login: EJV20
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T16:01:01Z
user: login: EJV20
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T16:01:11Z
user: login: EJV20
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-25T17:25:32Z

Review comments:
diff_hunk: @@ -0,0 +1,68 @@
+package prerna.unit.engine.api;
+
+import prerna.engine.api.FunctionTypeEnum;
+import prerna.engine.impl.function.AWSTextractFunctionEngine;
+import prerna.engine.impl.function.AzureDocumentIntelligenceCustomEmbeddingsFuntionEngine;
+import prerna.engine.impl.function.ImageDescriptionFunctionEngine;
+import prerna.engine.impl.function.LocalPythonCustomEmbeddingsFunctionEngine;
+import prerna.engine.impl.function.LocalPythonFunctionEngine;
+import prerna.engine.impl.function.RESTFunctionEngine;
+
+import static org.junit.Assert.assertEquals;
path: test/prerna/unit/engine/api/FunctionTypeEnumUnitTests.java
user: login: EJV20
body: use org.junit.jupiter.Assertions.assertEquals
created_at: 2025-03-24T15:59:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,100 @@
+package prerna.unit.engine.api;
+
+import static org.junit.Assert.assertEquals;
path: test/prerna/unit/engine/api/ModelTypeEnumUnitTests.java
user: login: EJV20
body: use junit 5 instead of junit 4
created_at: 2025-03-24T16:00:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,91 @@
+package prerna.unit.engine.api;
+
+import static org.junit.Assert.assertEquals;
path: test/prerna/unit/engine/api/StorageTypeEnumUnitTests.java
user: login: EJV20
body: use jupiter assertions
created_at: 2025-03-24T16:00:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,99 @@
+package prerna.unit.engine.api;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+
+import org.junit.jupiter.api.Test;
+
+import prerna.engine.api.VectorDatabaseTypeEnum;
+import prerna.engine.impl.vector.ChromaVectorDatabaseEngine;
+import prerna.engine.impl.vector.ElasticSearchRestVectorDatabaseEngine;
+import prerna.engine.impl.vector.FaissDatabaseEngine;
+import prerna.engine.impl.vector.OpenSearchRestVectorDatabaseEngine;
+import prerna.engine.impl.vector.PGVectorDatabaseEngine;
+import prerna.engine.impl.vector.PineConeVectorDatabaseEngine;
+import prerna.engine.impl.vector.WeaviateVectorDatabaseEngine;
+
+public class VectorDatabaseTypeEnumUnitTests {
+	
+	@Test
+	void testChroma() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.CHROMA;
+		assertEquals("CHROMA", testEnum.getVectorDatabaseName());
+		assertEquals(ChromaVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testFAISS() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.FAISS;
+		assertEquals("FAISS", testEnum.getVectorDatabaseName());
+		assertEquals(FaissDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testPG() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.PGVECTOR;
+		assertEquals("PGVECTOR", testEnum.getVectorDatabaseName());
+		assertEquals(PGVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testOpenSearch() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.OPEN_SEARCH;
+		assertEquals("OPEN_SEARCH", testEnum.getVectorDatabaseName());
+		assertEquals(OpenSearchRestVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testElasticSearch() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.ELASTIC_SEARCH;
+		assertEquals("ELASTIC_SEARCH", testEnum.getVectorDatabaseName());
+		assertEquals(ElasticSearchRestVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testWeaviate() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.WEAVIATE;
+		assertEquals("WEAVIATE", testEnum.getVectorDatabaseName());
+		assertEquals(WeaviateVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testPineCone() {
+		VectorDatabaseTypeEnum testEnum = VectorDatabaseTypeEnum.PINECONE;
+		assertEquals("PINECONE", testEnum.getVectorDatabaseName());
+		assertEquals(PineConeVectorDatabaseEngine.class.getName(), testEnum.getVectorDatabaseClass());
+	}
+	
+	@Test
+	void testBadVectorDatabaseName() {
+		String badName = "NOT_A_REAL_DATABASE";
+		try {
path: test/prerna/unit/engine/api/VectorDatabaseTypeEnumUnitTests.java
user: login: EJV20
body: use assertThrows instead of try catch statements.
created_at: 2025-03-24T16:01:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,28 @@
+package prerna.unit.engine.api;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.jupiter.api.Test;
+
+import prerna.engine.api.VenvTypeEnum;
+import prerna.engine.impl.venv.PythonVenvEngine;
+
+public class VenvTypeEnumUnitTests {
+
+	@Test
+	void testPython() {
+		VenvTypeEnum testEnum = VenvTypeEnum.PYTHON;
+		assertEquals("PYTHON", testEnum.getVenvName());
+		assertEquals(PythonVenvEngine.class.getName(), testEnum.getVenvClass());
+	}
+	
+	@Test
+	void testBadVectorDatabaseName() {
+		String badName = "NOT_A_REAL_VENV_TYPE";
+		try {
+			VenvTypeEnum.getEnumFromName(badName);
+		} catch (Exception e) {
+			assertEquals("Invalid input for name " + badName, e.getMessage());
path: test/prerna/unit/engine/api/VenvTypeEnumUnitTests.java
user: login: EJV20
body: use assert throws syntax
created_at: 2025-03-24T16:01:11Z
author_association: CONTRIBUTOR

PR comments:
user: login: github-actions[bot]
created_at: 2025-03-24T15:51:49Z
body: @CodiumAI-Agent /describe
author_association: NONE
user: login: QodoAI-Agent
created_at: 2025-03-24T15:52:22Z
body: ## Title

[#589] test(unit): added unit tests for prerna.engine.api package

___
### **User description**
## Description
Unit tests were created for prerna.engine.api package

## Changes Made
Unit tests added to:
 - FunctionTypeEnum.java
 - ModelTypeEnum.java
 - RemoteModelStateEnum.java
 - StorageTypeEnum.java
 - VectorDatabaseTypeEnum.java
 - VenvTypeEnum.java

## How to Test
In your local IDE
1. Navigate to prerna.unit.engine.api package
2. Right click -> run as -> junit test
3. All tests will run

## Notes
No other notes


___

### **PR Type**
- Tests



___

### **Description**
- Added comprehensive unit tests for prerna.engine.api enums.

- Verified mapping between enum names and engine class names.

- Tested proper exception handling for invalid enum inputs.

- Covered Function, Model, RemoteState, Storage, VectorDatabase, and Venv enums.


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
      <summary><strong>FunctionTypeEnumUnitTests.java</strong><dd><code>Unit tests for FunctionTypeEnum behavior</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test/prerna/unit/engine/api/FunctionTypeEnumUnitTests.java

<li>Added tests for AWS_TEXTRACT, IMAGE_DESCRIPTION, LOCAL_PYTHON, REST, <br>and AZURE variants.<br> <li> Validates function name and class mapping.<br> <li> Tests exception for invalid function name.


</details>


  </td>
  <td><a href="https://github.com/SEMOSS/Semoss/pull/618/files#diff-93e8bce757aa87e9a42aef548527f4e57ed2de9213934f5a73969a29da31d781">+68/-0</a>&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>ModelTypeEnumUnitTests.java</strong><dd><code>Unit tests for ModelTypeEnum mappings</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test/prerna/unit/engine/api/ModelTypeEnumUnitTests.java

<li>Added tests for BEDROCK, EMBEDDED, NER, KSERVE_VISION, and more.<br> <li> Validates model name and class mappings.<br> <li> Tests exception for invalid model name.


</details>


  </td>
  <td><a href="https://github.com/SEMOSS/Semoss/pull/618/files#diff-89aaa85335fffe346d2dc4ffe372963ca1a3093fd30d2a26beaaaeed5f559862">+100/-0</a>&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>RemoteModelStateEnumUnitTests.java</strong><dd><code>RemoteModelStateEnum existence test</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test/prerna/unit/engine/api/RemoteModelStateEnumUnitTests.java

<li>Added test to ensure all remote model state enums exist.<br> <li> Confirms the complete set of expected enum values.


</details>


  </td>
  <td><a href="https://github.com/SEMOSS/Semoss/pull/618/files#diff-e46c8f1b6780712d1dcbda2bc51e90db2df8a55df713921ac77865830d6f9561">+38/-0</a>&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>StorageTypeEnumUnitTests.java</strong><dd><code>Unit tests for StorageTypeEnum mappings</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test/prerna/unit/engine/api/StorageTypeEnumUnitTests.java

<li>Added tests for storage enum mappings (S3, CEPH, GOOGLE, etc.).<br> <li> Validates correct storage name and engine class association.<br> <li> Tests exception for invalid storage type.


</details>


  </td>
  <td><a href="https://github.com/SEMOSS/Semoss/pull/618/files#diff-aeec3d5614b54d3a45de0030d02be71b1a9a1d180ea76488771f03c72c66718c">+91/-0</a>&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>VectorDatabaseTypeEnumUnitTests.java</strong><dd><code>Unit tests for VectorDatabaseTypeEnum implementation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test/prerna/unit/engine/api/VectorDatabaseTypeEnumUnitTests.java

<li>Added tests for vector database enum to engine class mapping.<br> <li> Validates proper behavior for valid names.<br> <li> Checks null return for invalid class and exception for unknown name.


</details>


  </td>
  <td><a href="https://github.com/SEMOSS/Semoss/pull/618/files#diff-d80d78bb8bc02ded6ee29e86d0a3157bb0fe3adfb318d1d93bc1d3f58f7fd4ea">+99/-0</a>&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>VenvTypeEnumUnitTests.java</strong><dd><code>Unit tests for VenvTypeEnum mapping</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test/prerna/unit/engine/api/VenvTypeEnumUnitTests.java

<li>Added tests for PYTHON venv mapping.<br> <li> Validates exception handling for unknown venv type.


</details>


  </td>
  <td><a href="https://github.com/SEMOSS/Semoss/pull/618/files#diff-77e4b2cbfc7461aab1b5c0d473174584dd8a0810dc8d1d9c9ee27d67a18e8230">+28/-0</a>&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary>  Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details>
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-03-24T15:52:35Z
body: @CodiumAI-Agent /review
author_association: NONE
user: login: QodoAI-Agent
created_at: 2025-03-24T15:53:19Z
body: ## PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

<table>
<tr><td>⏱️&nbsp;<strong>Estimated effort to review</strong>: 1 🔵⚪⚪⚪⚪</td></tr>
<tr><td>🧪&nbsp;<strong>PR contains tests</strong></td></tr>
<tr><td>🔒&nbsp;<strong>No security concerns identified</strong></td></tr>
<tr><td>⚡&nbsp;<strong>Recommended focus areas for review</strong><br><br>

<details><summary><a href='https://github.com/SEMOSS/Semoss/pull/618/files#diff-93e8bce757aa87e9a42aef548527f4e57ed2de9213934f5a73969a29da31d781R60-R67'><strong>Exception Testing</strong></a>

Consider using JUnit 5’s assertThrows for exception testing instead of try-catch blocks. This can lead to more concise tests and clearer failure messages.
</summary>

```java
void testBadFunctionName() {
	String badName = "NOT_A_REAL_FUNCTION";
	try {
		FunctionTypeEnum.getEnumFromName(badName);
	} catch (Exception e) {
		assertEquals("Invalid input for name " + badName, e.getMessage());
	}
}
```

</details>

<details><summary><a href='https://github.com/SEMOSS/Semoss/pull/618/files#diff-93e8bce757aa87e9a42aef548527f4e57ed2de9213934f5a73969a29da31d781R11-R11'><strong>JUnit Consistency</strong></a>

There is a mix of JUnit 4 and JUnit 5 assertions (e.g., using org.junit.Assert.assertEquals alongside org.junit.jupiter.api.Test). Standardizing on JUnit 5 can improve consistency.
</summary>

```java
import static org.junit.Assert.assertEquals;
```

</details>

</td></tr>
</table>

author_association: NONE
user: login: github-actions[bot]
created_at: 2025-03-24T15:53:21Z
body: @CodiumAI-Agent /improve
author_association: NONE
user: login: QodoAI-Agent
created_at: 2025-03-24T15:54:05Z
body: ## PR Code Suggestions ✨

No code suggestions found for the PR.
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-03-25T19:35:01Z
body: @CodiumAI-Agent /update_changelog
author_association: NONE
user: login: QodoAI-Agent
created_at: 2025-03-25T19:35:23Z
body: **Changelog updates:** 🔄

## 2025-03-25 [*](https://github.com/SEMOSS/Semoss/pull/618)
### Added
- Unit tests for API enums.


>to commit the new content to the CHANGELOG.md file, please type:
>'/update_changelog --pr_update_changelog.push_changelog_changes=true'

author_association: NONE