Buggy code:
public class AttributesTestCase { private static PathElement PATH = PathElement . pathElement ( "toto" , "testSubsystem" ) ; private Resource resourceRoot = Factory . create ( ) ; private TransformerRegistry registry = TransformerRegistry . Factory . create ( null ) ; private ManagementResourceRegistration resourceRegistration = ManagementResourceRegistration . Factory . create ( AttributesTestCase . ROOT ) ; private TransformersSubRegistration transformersSubRegistration ; private ModelNode resourceModel ; @ Before public void setUp ( ) { } @ Test public void testRejectExpressions ( ) throws Exception { } @ Test public void testCustomRejectChecker ( ) throws Exception { } @ Test public void testListReject ( ) throws Exception { } @ Test public void testObjectReject ( ) throws Exception { } @ Test public void testDiscardAlways ( ) throws Exception { } @ Test public void testDiscardUndefined ( ) throws Exception { } @ Test public void testDiscardNotHappeningWithExpressions ( ) throws Exception { } @ Test public void testDiscardDefaultValue ( ) throws Exception { } @ Test public void testRenameAttribute ( ) throws Exception { } @ Test public void testConvertValue ( ) throws Exception { } @ Test public void testAddValue ( ) throws Exception { } @ Test public void testComplexRejectAndModify ( ) throws Exception { } @ Test public void testNameFromAddressConverter ( ) throws Exception { } @ Test public void testAccessOtherValue ( ) throws Exception { } @ Test public void testConvertVsAdd ( ) throws Exception { } private void checkWriteOp ( ModelNode write , String name , ModelNode value ) throws OperationFailedException { } private void checkOpDiscarded ( ModelNode write ) throws OperationFailedException { } 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 ) { <START_BUG> return TransformationTargetImpl . create ( registry , version , Collections . < PathAddress , ModelVersion > emptyMap ( ) , null , type ) ; <END_BUG> } 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" ) , AttributesTestCase . NOOP_PROVIDER ) ; private static final ModelNode success ( ) { } private static final ModelNode failed ( ) { } private static class DontRejectChecker extends DefaultRejectAttributeChecker { boolean called ; @ Override public boolean rejectAttribute ( PathAddress address , String attributeName , ModelNode attributeValue , TransformationContext context ) { } @ Override public String getRejectionLogMessage ( Map < String , ModelNode > attributes ) { } } private static class CustomRejectExpressionsChecker implements RejectAttributeChecker { boolean rejected ; @ Override public boolean rejectOperationParameter ( PathAddress address , String attributeName , ModelNode attributeValue , ModelNode operation , TransformationContext context ) { } @ Override public boolean rejectResourceAttribute ( PathAddress address , String attributeName , ModelNode attributeValue , TransformationContext context ) { } @ Override public String getRejectionLogMessageId ( ) { } @ Override public String getRejectionLogMessage ( Map < String , ModelNode > attributes ) { } } private static class RejectTwoChecker extends DefaultRejectAttributeChecker { int count ; boolean rejected ; @ Override public boolean rejectAttribute ( PathAddress address , String attributeName , ModelNode attributeValue , TransformationContext context ) { } @ Override public String getRejectionLogMessage ( Map < String , ModelNode > attributes ) { } } private static class VisibilityCheckerAndConverter implements AttributeConverter , DiscardAttributeChecker , RejectAttributeChecker { String convertValue ; String discardValue ; String rejectValue ; void checkValues ( String expected ) { } void reset ( ) { } @ Override public boolean isDiscardExpressions ( ) { } @ Override public boolean isDiscardUndefined ( ) { } @ Override public boolean isOperationParameterDiscardable ( PathAddress address , String attributeName , ModelNode attributeValue , ModelNode operation , TransformationContext context ) { } @ Override public boolean isResourceAttributeDiscardable ( PathAddress address , String attributeName , ModelNode attributeValue , TransformationContext context ) { } @ Override public void convertOperationParameter ( PathAddress address , String name , ModelNode attributeValue , ModelNode operation , TransformationContext context ) { } @ Override public void convertResourceAttribute ( PathAddress address , String name , ModelNode attributeValue , TransformationContext context ) { } @ Override public boolean rejectOperationParameter ( PathAddress address , String attributeName , ModelNode attributeValue , ModelNode operation , TransformationContext context ) { } @ Override public boolean rejectResourceAttribute ( PathAddress address , String attributeName , ModelNode attributeValue , TransformationContext context ) { } @ Override public String getRejectionLogMessageId ( ) { } @ Override public String getRejectionLogMessage ( Map < String , ModelNode > attributes ) { } } private static class AttributeNameValueConverter extends DefaultAttributeConverter { @ Override protected void convertAttribute ( PathAddress address , String name , ModelNode attributeValue , TransformationContext context ) { } } }

Fix:
return TransformationTargetImpl . create ( registry , version , Collections . < PathAddress , ModelVersion > emptyMap ( ) , null , type , null ) ;