static <E extends Enum<E>> String enumName(final E state)
    {
        return null == state ? "null" : state.name();
    }
@Test
    void stateNameReturnsNullIfNull()
    {
        assertEquals("null", enumName(null));
    }