### Question:
RNMarketingCloudSdkModule extends ReactContextBaseJavaModule { @ReactMethod public void setAttribute(final String key, final String value) { handleAction(new Action() { @Override void execute(MarketingCloudSdk sdk) { sdk.getRegistrationManager().edit().setAttribute(key, value).commit(); } }); } RNMarketingCloudSdkModule(ReactApplicationContext reactContext); @Override String getName(); @ReactMethod void isPushEnabled(Promise promise); @ReactMethod void enablePush(); @ReactMethod void disablePush(); @ReactMethod void getSystemToken(Promise promise); @ReactMethod void getAttributes(Promise promise); @ReactMethod void setAttribute(final String key, final String value); @ReactMethod void clearAttribute(final String key); @ReactMethod void addTag(final String tag); @ReactMethod void removeTag(final String tag); @ReactMethod void getTags(Promise promise); @ReactMethod void setContactKey(final String contactKey); @ReactMethod void getContactKey(final Promise promise); @ReactMethod void enableVerboseLogging(); @ReactMethod void disableVerboseLogging(); @ReactMethod void logSdkState();  }### Answer:
@Test public void setAttribute() { ShadowMarketingCloudSdk.isReady(true); when(registrationEditor.commit()).thenReturn(true); reactModule.setAttribute("Name", "Tester"); InOrder order = inOrder(registrationEditor); order.verify(registrationEditor).setAttribute("Name", "Tester"); order.verify(registrationEditor).commit(); }