test_class.file: sdk-libs/halo-notifications/src/test/java/com/mobgen/halo/android/notifications/decorator/NotificationSoundDecoratorTest.java
test_class.identifier: NotificationSoundDecoratorTest
test_class.superclass: extends BaseNotificationDecoratorTest<NotificationSoundDecorator>
test_case.body: @Test
      public void emptySoundTest() {
          final boolean[] marker = new boolean[1];
          Bundle bundle = BundleTestUtils.builder().build();
          when(getBuilder().setSound(any(Uri.class))).then(new Answer<Object>() {
              @Override
              public Object answer(InvocationOnMock invocation) throws Throwable {
                  marker[0] = true;
                  return null;
              }
          });
          getDecorator().decorate(getBuilder(), bundle);
          Assert.assertFalse(marker[0]);
      }
test_case.class_method_signature: NotificationSoundDecoratorTest.emptySoundTest()
test_case.full_signature: @Test public void emptySoundTest()
test_case.identifier: emptySoundTest
test_case.invocations: build builder then when setSound getBuilder any decorate getDecorator getBuilder assertFalse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void emptySoundTest()
focal_class.declarator: mContext
focal_class.modifier: private
focal_class.original_string: private Context mContext;
focal_class.type: Context
focal_class.var_name: mContext
focal_class.file: sdk-libs/halo-notifications/src/main/java/com/mobgen/halo/android/notifications/decorator/NotificationSoundDecorator.java
focal_class.identifier: NotificationSoundDecorator
focal_class.class_method_signature: NotificationSoundDecorator.NotificationSoundDecorator(Context context, HaloNotificationDecorator decorator)
focal_class.full_signature: public  NotificationSoundDecorator(Context context, HaloNotificationDecorator decorator)
focal_class.identifier: NotificationSoundDecorator
focal_class.modifiers: public
focal_class.parameters: (Context context, HaloNotificationDecorator decorator)
focal_class.signature:  NotificationSoundDecorator(Context context, HaloNotificationDecorator decorator)
focal_class.class_method_signature: NotificationSoundDecorator.decorate(@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle)
focal_class.full_signature: @Override public NotificationCompat.Builder decorate(@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle)
focal_class.identifier: decorate
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle)
focal_class.return: NotificationCompat.Builder
focal_class.signature: NotificationCompat.Builder decorate(@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle)
focal_class.superclass: extends HaloNotificationDecorator
focal_method.body: @Override
      public NotificationCompat.Builder decorate(@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle) {
          String sound = bundle.getString("sound");
          if (!TextUtils.isEmpty(sound)) {
              Uri soundUri = null;
              if ("default".equalsIgnoreCase(sound)) {
                  soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
              } else {
                  int soundId = mContext.getResources().getIdentifier(sound, "raw", mContext.getPackageName());
                  if (soundId != 0) {
                      soundUri = HaloUtils.getUriFromResource(mContext, soundId);
                  }
              }
              if (soundUri != null) {
                  builder.setSound(soundUri);
              }
          }
          return chain(builder, bundle);
      }
focal_method.class_method_signature: NotificationSoundDecorator.decorate(@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle)
focal_method.full_signature: @Override public NotificationCompat.Builder decorate(@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle)
focal_method.identifier: decorate
focal_method.invocations: getString isEmpty equalsIgnoreCase getDefaultUri getIdentifier getResources getPackageName getUriFromResource setSound chain
focal_method.modifiers: @Override public
focal_method.parameters: (@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle)
focal_method.return: NotificationCompat.Builder
focal_method.signature: NotificationCompat.Builder decorate(@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle)