@Test public void testOnDemandMissingPercentage() { InstanceTemplate instanceTemplate = new InstanceTemplate("", "", 0L, Collections.emptyList(), InstanceStatus.STARTED, Map.of(), 0L, IMAGE_ID); AwsInstanceView actual = new AwsInstanceView(instanceTemplate); assertThat(actual.getOnDemandPercentage()).isEqualTo(100); }
public int getOnDemandPercentage() { return HUNDRED_PERCENT - Objects.requireNonNullElse(getSpotPercentage(), 0); }
AwsInstanceView { public int getOnDemandPercentage() { return HUNDRED_PERCENT - Objects.requireNonNullElse(getSpotPercentage(), 0); } }
AwsInstanceView { public int getOnDemandPercentage() { return HUNDRED_PERCENT - Objects.requireNonNullElse(getSpotPercentage(), 0); } AwsInstanceView(InstanceTemplate instanceTemplate); }
AwsInstanceView { public int getOnDemandPercentage() { return HUNDRED_PERCENT - Objects.requireNonNullElse(getSpotPercentage(), 0); } AwsInstanceView(InstanceTemplate instanceTemplate); List<Volume> getVolumes(); String getFlavor(); String getGroupName(); Long getPrivateId(); Long getTemplateId(); boolean isEncryptedVolumes(); boolean isKmsEnabled(); boolean isKmsDefault(); boolean isKmsCustom(); String getKmsKey(); Integer getSpotPercentage(); Double getSpotMaxPrice(); int getOnDemandPercentage(); boolean isFastEbsEncryptionEnabled(); }
AwsInstanceView { public int getOnDemandPercentage() { return HUNDRED_PERCENT - Objects.requireNonNullElse(getSpotPercentage(), 0); } AwsInstanceView(InstanceTemplate instanceTemplate); List<Volume> getVolumes(); String getFlavor(); String getGroupName(); Long getPrivateId(); Long getTemplateId(); boolean isEncryptedVolumes(); boolean isKmsEnabled(); boolean isKmsDefault(); boolean isKmsCustom(); String getKmsKey(); Integer getSpotPercentage(); Double getSpotMaxPrice(); int getOnDemandPercentage(); boolean isFastEbsEncryptionEnabled();  }