### Question:
NameUtils { @Nullable public static String toEnumName( @Nullable Object value ) { if ( value == null ) { return null; } final String stringValue = value.toString(); if ( stringValue == null ) { return null; } if ( stringValue.length() == 0 ) { return stringValue; } if ( containsNoLowerCase( stringValue ) ) { return stringValue.replace( '-', '_' ); } return Arrays.stream( StringUtils.splitByCharacterTypeCamelCase( stringValue.replace( '-', '_' ) ) ) .filter( v -> !v.equals( "_" ) ).collect( Collectors.joining( "_" ) ).toUpperCase(); } private  NameUtils(); @Nullable static String toClassName( @Nullable Object value ); @Nonnull static T toEnumValue( @Nonnull Class<T> enumClass, @Nullable Object value ); @Nullable static T toEnumValue( @Nonnull Class<T> enumClass, @Nullable String value ); @Nullable static String toEnumName( @Nullable Object value );  }### Answer:
@Test public void toEnumNameNull() { Assert.assertNull( NameUtils.toEnumName( null ) ); }
@Test public void toEnumNameNullString() { Assert.assertNull( NameUtils.toEnumName( new Object() { @Override public String toString() { return null; } } ) ); }
@Test public void toEnumNameUnchanged() { Assert.assertEquals( "TEST_VALUE_1", NameUtils.toEnumName( "TEST_VALUE_1" ) ); }
@Test public void toEnumNameUppercaseDashes() { Assert.assertEquals( "TEST_VALUE_1", NameUtils.toEnumName( "TEST-VALUE-1" ) ); }
@Test public void toEnumNameLowercaseDashes() { Assert.assertEquals( "TEST_VALUE_1", NameUtils.toEnumName( "test-value-1" ) ); }
@Test public void toEnumNameCamelCaseUpper() { Assert.assertEquals( "TEST_VALUE_1", NameUtils.toEnumName( "TestValue1" ) ); }
@Test public void toEnumNameCamelCaseLower() { Assert.assertEquals( "TEST_VALUE_1", NameUtils.toEnumName( "testValue1" ) ); }
@Test public void toEnumNameUnchanged2() { Assert.assertEquals( "DSTU3", NameUtils.toEnumName( "DSTU3" ) ); }
@Test public void toEnumNameEmpty() { Assert.assertEquals( "", NameUtils.toEnumName( "" ) ); }