<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shoaib Pinjari</title>
    <description>The latest articles on DEV Community by Shoaib Pinjari (@shogu123).</description>
    <link>https://dev.to/shogu123</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1441285%2Fa460e1d8-0e4f-4de1-81d6-9636d68b57bd.png</url>
      <title>DEV Community: Shoaib Pinjari</title>
      <link>https://dev.to/shogu123</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shogu123"/>
    <language>en</language>
    <item>
      <title>Book</title>
      <dc:creator>Shoaib Pinjari</dc:creator>
      <pubDate>Thu, 20 Aug 2026 18:32:46 +0000</pubDate>
      <link>https://dev.to/shogu123/book-38db</link>
      <guid>https://dev.to/shogu123/book-38db</guid>
      <description></description>
      <category>backend</category>
      <category>java</category>
      <category>software</category>
      <category>testing</category>
    </item>
    <item>
      <title>shogu</title>
      <dc:creator>Shoaib Pinjari</dc:creator>
      <pubDate>Wed, 19 Aug 2026 19:51:56 +0000</pubDate>
      <link>https://dev.to/shogu123/shogu-5djj</link>
      <guid>https://dev.to/shogu123/shogu-5djj</guid>
      <description>&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/test"&gt;@test&lt;/a&gt;&lt;br&gt;
@DisplayName("Should validate successfully when EOD rate is available in legacy database")&lt;br&gt;
void shouldValidateWhenEodRateIsAvailable() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LocalDate businessDate =
        segmentBusinessDatesService.getCurrentBusinessDate();

ForexMtmRate legacyRate = ForexMtmRate.builder()
        .businessDate(businessDate)
        .tradeType(SPOT.getValue())
        .processIdentifier(MTMEOD.getValue())
        .rate(new BigDecimal("85.50"))
        .build();

forexMtmRateRepository.save(legacyRate);

MtmRatesRequestDto dto = new MtmRatesRequestDto();

dto.setCurrencyCode("USD");
dto.setExchangeRate(new BigDecimal("85.50"));
dto.setHaircutAcceptance(false);
dto.setRateType(EOD.toString());

List&amp;lt;MtmRatesRequestDto&amp;gt; requestList =
        List.of(dto);

assertDoesNotThrow(
        () -&amp;gt; mtmRatesService.validateMtmRates(requestList)
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/test"&gt;@test&lt;/a&gt;&lt;br&gt;
@DisplayName("Should throw exception when EOD rate is not available in legacy database")&lt;br&gt;
void shouldThrowExceptionWhenEodRateIsNotAvailable() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MtmRatesRequestDto dto = new MtmRatesRequestDto();

dto.setCurrencyCode("USD");
dto.setExchangeRate(new BigDecimal("85.50"));
dto.setHaircutAcceptance(false);
dto.setRateType(EOD.toString());

List&amp;lt;MtmRatesRequestDto&amp;gt; requestList =
        List.of(dto);

BusinessValidationException exception =
        assertThrows(
                BusinessValidationException.class,
                () -&amp;gt; mtmRatesService.validateMtmRates(requestList)
        );

assertEquals(
        "USD/INR EOD rates not Uploaded",
        exception.getMessage()
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/test"&gt;@test&lt;/a&gt;&lt;br&gt;
@DisplayName("Should throw exception when EOD legacy record exists but rate is null")&lt;br&gt;
void shouldThrowExceptionWhenLegacyEodRateIsNull() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LocalDate businessDate =
        segmentBusinessDatesService.getCurrentBusinessDate();

ForexMtmRate legacyRate = ForexMtmRate.builder()
        .businessDate(businessDate)
        .tradeType(SPOT.getValue())
        .processIdentifier(MTMEOD.getValue())
        .rate(null)
        .build();

forexMtmRateRepository.save(legacyRate);

MtmRatesRequestDto dto = new MtmRatesRequestDto();

dto.setCurrencyCode("USD");
dto.setExchangeRate(new BigDecimal("85.50"));
dto.setHaircutAcceptance(false);
dto.setRateType(EOD.toString());

List&amp;lt;MtmRatesRequestDto&amp;gt; requestList =
        List.of(dto);

BusinessValidationException exception =
        assertThrows(
                BusinessValidationException.class,
                () -&amp;gt; mtmRatesService.validateMtmRates(requestList)
        );

assertEquals(
        "USD/INR EOD rates not Uploaded",
        exception.getMessage()
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

</description>
      <category>backend</category>
      <category>java</category>
      <category>springboot</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
