FormInstanceMetadata { public boolean isValid() { return !TextUtils.isEmpty(zipFileName) && !TextUtils.isEmpty(formInstanceData) && !TextUtils .isEmpty(formId); } FormInstanceMetadata(String zipFileName, String formId, String formInstanceData,
            @NonNull Set<String> mediaFileNames); String getZipFileName(); String getFormId(); Set<String> getMediaFileNames(); String getFormInstanceData(); boolean isValid();  }
@Test public void isValidShouldReturnFalseIfAllFieldsNull() { FormInstanceMetadata formInstanceMetadata = new FormInstanceMetadata(null, null, null, Collections.emptySet()); assertFalse(formInstanceMetadata.isValid()); }
@Test public void isValidShouldReturnFalseIfAllFieldsEmpty() { FormInstanceMetadata formInstanceMetadata = new FormInstanceMetadata("", "", "", Collections.emptySet()); assertFalse(formInstanceMetadata.isValid()); }
@Test public void isValidShouldReturnFalseZipFileNameNull() { FormInstanceMetadata formInstanceMetadata = new FormInstanceMetadata(null, "test", "test", Collections.emptySet()); assertFalse(formInstanceMetadata.isValid()); }
@Test public void isValidShouldReturnFalseFormInstanceDataNull() { FormInstanceMetadata formInstanceMetadata = new FormInstanceMetadata("test", null, "test", Collections.emptySet()); assertFalse(formInstanceMetadata.isValid()); }
@Test public void isValidShouldReturnFalseFormIdNull() { FormInstanceMetadata formInstanceMetadata = new FormInstanceMetadata("test", "test", null, Collections.emptySet()); assertFalse(formInstanceMetadata.isValid()); }
@Test public void isValidShouldReturnTrueIfAllValuesValid() { FormInstanceMetadata formInstanceMetadata = new FormInstanceMetadata("test", "test", "test", Collections.emptySet()); assertTrue(formInstanceMetadata.isValid()); }