Deleting properties out of the application.yml to make sure there is no unwanted default value for those properties. Also: removing warnings and improving style.
diff --git a/component-test/src/main/java/io/mifos/portfolio/AbstractPortfolioTest.java b/component-test/src/main/java/io/mifos/portfolio/AbstractPortfolioTest.java
index 4e27123..bf96465 100644
--- a/component-test/src/main/java/io/mifos/portfolio/AbstractPortfolioTest.java
+++ b/component-test/src/main/java/io/mifos/portfolio/AbstractPortfolioTest.java
@@ -70,7 +70,9 @@
  */
 @RunWith(SpringRunner.class)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT,
-        classes = {AbstractPortfolioTest.TestConfiguration.class})
+        classes = {AbstractPortfolioTest.TestConfiguration.class},
+    properties = {"portfolio.bookInterestAsUser=interest_user", "portfolio.bookInterestInTimeSlot=0"}
+)
 public class AbstractPortfolioTest extends SuiteTestEnvironment {
   private static final String LOGGER_NAME = "test-logger";
 
@@ -111,12 +113,15 @@
 
   private AutoUserContext userContext;
 
+  @SuppressWarnings({"SpringAutowiredFieldsWarningInspection", "SpringJavaAutowiringInspection"})
   @Autowired
   protected EventRecorder eventRecorder;
 
+  @SuppressWarnings("SpringAutowiredFieldsWarningInspection")
   @Autowired
   PortfolioManager portfolioManager;
 
+  @SuppressWarnings("SpringAutowiredFieldsWarningInspection")
   @Autowired
   IndividualLending individualLending;
 
@@ -127,6 +132,7 @@
   @MockBean
   LedgerManager ledgerManager;
 
+  @SuppressWarnings("SpringAutowiredFieldsWarningInspection")
   @Autowired
   @Qualifier(LOGGER_NAME)
   Logger logger;
@@ -202,7 +208,7 @@
     Assert.assertTrue(eventRecorder.wait(event, new IndividualLoanCommandEvent(productIdentifier, caseIdentifier)));
 
     final Case customerCase = portfolioManager.getCase(productIdentifier, caseIdentifier);
-    Assert.assertEquals(customerCase.getCurrentState(), nextState.name());
+    Assert.assertEquals(nextState.name(), customerCase.getCurrentState());
   }
 
   boolean individualLoanCommandEventMatches(
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
index 4493358..6688e4a 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -75,13 +75,4 @@
   threadName: async-processor-
 
 flyway:
-  enabled: false
-
-system:
-  publicKey:
-    exponent: 65537
-    modulus: 21188023007955682867939457181271038457216099278949187456460742046123672432355777599460689470319454021384777684967830053993002724303461144745107517305075315187397862430851722919529943465029389248042840364475999768651348557757734298942211509744303551097953258597691851996692366468761965138767429272032120029271744611798874201312092155969603381492096789028306859853929900848124928201000469425135976322303229632628092728624143573273277870884919055453251617011673264035045823652246768583219018126865521694880333238485410601803458379987829318615730229086183405850999386270584135805252231189505197494383178133769189765423639
-
-portfolio:
-  bookInterestAsUser: interest_user
-  bookInterestInTimeSlot: 0
\ No newline at end of file
+  enabled: false
\ No newline at end of file