### Question:
FlakeEncodingProvider implements EncodingProvider { @Override public long encodeAsLong(long time, int sequence) { throw new UnsupportedOperationException("Long value not supported"); } FlakeEncodingProvider(long machineId); @Override byte[] encodeAsBytes(long time, int sequence); @Override long encodeAsLong(long time, int sequence); @Override String encodeAsString(long time, int sequence); @Override int maxSequenceNumbers();  }### Answer:
@Test public void notImplemented() { try { new FlakeEncodingProvider(1).encodeAsLong(1, 1); Assert.fail("Expected UnsupportedOperationException"); } catch (UnsupportedOperationException e) { Assert.assertTrue(e.getMessage().contains("Long value not supported")); } }