Buggy code:
public class BasicResourceTestCase { private static PathElement PATH = PathElement . pathElement ( "toto" , "testSubsystem" ) ; private static PathElement DISCARD = PathElement . pathElement ( "discard" ) ; private static PathElement CONFIGURATION_TEST = PathElement . pathElement ( "configuration" , "test" ) ; private static PathElement TEST_CONFIGURATION = PathElement . pathElement ( "test" , "configuration" ) ; private static PathElement SETTING_DIRECTORY = PathElement . pathElement ( "setting" , "directory" ) ; private static PathElement DIRECTORY_SETTING = PathElement . pathElement ( "directory" , "setting" ) ; private Resource resourceRoot = Factory . create ( ) ; private TransformerRegistry registry = TransformerRegistry . Factory . create ( null ) ; private ManagementResourceRegistration resourceRegistration = ManagementResourceRegistration . Factory . create ( BasicResourceTestCase . ROOT ) ; private static final TransformationDescription description ; @ Before public void setUp ( ) { resourceRoot = Factory . create ( ) ; registry = TransformerRegistry . Factory . create ( null ) ; resourceRegistration = ManagementResourceRegistration . Factory . create ( BasicResourceTestCase . ROOT ) ; final Resource toto = Factory . create ( ) ; toto . getModel ( ) . get ( "test" ) . set ( "onetwothree" ) ; final Resource discard = Factory . create ( ) ; discard . getModel ( ) . get ( "attribute" ) . set ( "two" ) ; toto . registerChild ( PathElement . pathElement ( "discard" , "one" ) , discard ) ; final Resource configuration = Factory . create ( ) ; final Resource setting = Factory . create ( ) ; configuration . registerChild ( BasicResourceTestCase . SETTING_DIRECTORY , setting ) ; toto . registerChild ( BasicResourceTestCase . CONFIGURATION_TEST , configuration ) ; final Resource attrResource = Factory . create ( ) ; attrResource . getModel ( ) . get ( "test-resource" ) . set ( "abc" ) ; toto . registerChild ( PathElement . pathElement ( "attribute-resource" , "test" ) , attrResource ) ; final Resource resourceAttr = Factory . create ( ) ; resourceAttr . getModel ( ) . get ( "test-attribute" ) . set ( "test" ) ; attrResource . registerChild ( PathElement . pathElement ( "resource-attribute" , "test" ) , resourceAttr ) ; resourceRoot . registerChild ( BasicResourceTestCase . PATH , toto ) ; final TransformersSubRegistration reg = registry . getServerRegistration ( ModelVersion . create ( 1 ) ) ; <START_BUG> BasicResourceTestCase . description . register ( reg ) ; <END_BUG> } @ Test public void testResourceTransformation ( ) throws Exception { } @ Test public void testAddOperation ( ) throws Exception { } @ Test public void testWriteAttribute ( ) throws Exception { } @ Test public void testAlias ( ) throws Exception { } @ Test public void testOperationTransformer ( ) throws Exception { } @ Test public void testRenameOperation ( ) throws Exception { } private Resource transformResource ( ) throws OperationFailedException { } private TransformedOperation transformOperation ( final ModelNode operation ) throws OperationFailedException { } private ResourceTransformationContext createContext ( final TransformationTarget target ) { } private Transformers getTransfomers ( final TransformationTarget target ) { } protected TransformationTarget create ( final TransformerRegistry registry , ModelVersion version ) { } protected TransformationTarget create ( final TransformerRegistry registry , ModelVersion version , TransformationTarget . TransformationTargetType type ) { } private static final DescriptionProvider NOOP_PROVIDER = new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { } } ; private static final ResourceDefinition ROOT = new org . jboss . as . controller . SimpleResourceDefinition ( PathElement . pathElement ( "test" ) , BasicResourceTestCase . NOOP_PROVIDER ) ; private static final ModelNode success ( ) { } private static final ModelNode failed ( ) { } }

Fix:
Tools . register ( BasicResourceTestCase . description , reg ) ;