@Test public void marshal_long_strings_to_long() throws Exception { String validInput = String.valueOf(Long.MAX_VALUE); double expectedOutput = Long.MAX_VALUE; assertThat(doubleBodyMarshaller.marshal(validInput)).isEqualTo(expectedOutput); }
@Test public void marshal_float_strings_to_long() throws Exception { String invalidInput = "0.5f"; double expectedOutput = 0.5d; assertThat(doubleBodyMarshaller.marshal(invalidInput)).isEqualTo(expectedOutput); }
@Test public void marshal_integer_strings_to_long() throws Exception { String validInput = "5"; double expectedOutput = 5; assertThat(doubleBodyMarshaller.marshal(validInput)).isEqualTo(expectedOutput); }