### Question:
PrivateKey extends Key { public static PrivateKey fromDecimalString(final String decimal) { return new PrivateKey(new BigInteger(decimal, 10)); } PrivateKey(final BigInteger value);  PrivateKey(byte[] bytes);  PrivateKey(String hex); static PrivateKey fromHexString(final String hex); static PrivateKey fromDecimalString(final String decimal); static PrivateKey generateRandom(); static final int SIZE; }### Answer:
@Test public void canCreateFromDecimalString() { final PrivateKey key = PrivateKey.fromDecimalString("2279"); MatcherAssert.assertThat(key.getRaw(), IsEqual.equalTo(new BigInteger("2279"))); }
@Test public void canCreateFromNegativeDecimalString() { final PrivateKey key = PrivateKey.fromDecimalString("-2279"); MatcherAssert.assertThat(key.getRaw(), IsEqual.equalTo(new BigInteger("63257"))); }
@Test public void cannotCreateAroundMalformedDecimalString() { Assertions.assertThrows( NumberFormatException.class, () -> PrivateKey.fromDecimalString("22A75")); }