public void testStringToJavaIdentifier() throws Exception
{
final MasterConversionService service = Sapphire.service( MasterConversionService.class );
assertEquals( new JavaIdentifier( "_" ), service.convert( "_", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "$" ), service.convert( "$", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "a" ), service.convert( "a", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "_abc" ), service.convert( "_abc", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "$abc" ), service.convert( "$abc", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "aabc" ), service.convert( "aabc", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "AbC_" ), service.convert( "AbC_", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "AbC$" ), service.convert( "AbC$", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "AbCa" ), service.convert( "AbCa", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "AbC1" ), service.convert( "AbC1", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "abc123" ), service.convert( "abc123", JavaIdentifier.class ) );
assertEquals( new JavaIdentifier( "abc$_123" ), service.convert( "abc$_123", JavaIdentifier.class ) );
assertNull( service.convert( "1", JavaIdentifier.class ) );
assertNull( service.convert( "1abc", JavaIdentifier.class ) );
assertNull( service.convert( "ab#c", JavaIdentifier.class ) );
assertNull( service.convert( "ab.c", JavaIdentifier.class ) );