Add test to provide coverage for priavte factory function
package com.quorum.tessera.nacl;
+import java.lang.reflect.Method;
import org.junit.Test;
import java.util.Objects;
@@ -47,4 +48,15 @@ public class KeyTest {
assertThat(key.toString()).isNotBlank();
}
+ @Test
+ public void createWithFactoryMethod() throws Exception {
+ Method method = Key.class.getDeclaredMethod("create");
+ method.setAccessible(true);
+
+ Key key = (Key) method.invoke(null);
+
+ assertThat(key).isNotNull();
+
+ }
+
}
