AmrProfileStatusCodeHelper { public Short toValue(final Set<AmrProfileStatusCodeFlagDto> amrProfileStatusCodeFlags) { return BYTE_REGISTER_CONVERTER.toLongValue(amrProfileStatusCodeFlags).shortValue(); }  Integer toBitPosition(final AmrProfileStatusCodeFlagDto amrProfileStatus); Set<AmrProfileStatusCodeFlagDto> toAmrProfileStatusCodeFlags(final Number registerValue); Short toValue(final Set<AmrProfileStatusCodeFlagDto> amrProfileStatusCodeFlags);  }
@Test public void testConvertToLong() { final Set<AmrProfileStatusCodeFlagDto> amrStatusCodeFlags = new HashSet<>(); amrStatusCodeFlags.add(AmrProfileStatusCodeFlagDto.DATA_NOT_VALID); amrStatusCodeFlags.add(AmrProfileStatusCodeFlagDto.POWER_DOWN); assertThat((short) this.helperService.toValue(amrStatusCodeFlags)).isEqualTo((short) 132); }