BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

VMware 2V0-72.22 Exam - Topic 9 Question 70 Discussion

Posted by Talia on Apr 03, 2025 at 08:30 PM

Which statement about @TestPropertySource annotation is true? (Choose the best answer.)

Suggested Answer: D

Get Premium 2V0-72.22 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
33 comments · newest first
AN
Antonette 11 months ago
I didn't know that about @TestPropertySource, sounds useful!
BE
Bettina 11 months ago
Wait, are you sure about that? I thought A was true.
AL
Alayna 11 months ago
I think option C is correct. It loads properties relative to the project root.
CE
Ceola 12 months ago
Totally agree with C! That's how it works.
CH
Chu 12 months ago
D is interesting too, inlined properties can really help!
CA
Carman 12 months ago
I thought that inlined properties in @TestPropertySource could override file properties, so maybe option D is the best choice after all.
ET
Ethan 1 year ago
I practiced a similar question, and I recall that @TestPropertySource loads properties from a specific location, but I can't remember if it's relative to the project root or not.
AL
Alex 1 year ago
I'm not entirely sure, but I feel like @TestPropertySource can override properties from @PropertySource, which makes me lean towards option D.
MA
Marg 1 year ago
I think option A might be correct because I remember something about system properties having higher precedence in Spring.
LA
Layla 1 year ago
I've got a good strategy for this. I'll start by eliminating the options I'm sure are wrong, then focus on the remaining ones and try to reason through which one is the best answer based on my understanding of @TestPropertySource.
RE
Reyes 1 year ago
I'm a bit confused by the options here. I know @TestPropertySource is related to loading properties for tests, but I'm not sure how it interacts with other property sources like @PropertySource. I'll have to review my notes on this.
CA
Carlee 1 year ago
Okay, let me see. I remember that @TestPropertySource is used to load properties specifically for tests, so I think the answer is probably C - it loads a properties file relative to the project root by default.
YV
Yvonne 1 year ago
Hmm, I'm a bit unsure about this. I know @TestPropertySource has something to do with loading properties for tests, but I'm not sure about the details. I'll have to think this through carefully.
CE
Cecil 1 year ago
I'm pretty confident about this one. I think the answer is D - inlined properties in @TestPropertySource can override properties in property files.
LE
Lemuel 2 years ago
Option B? Really? That can't be right. Who would ever want to not load properties from @PropertySource? Sounds like a bad idea to me.
WE
Wei 1 year ago
↳ replying to Lemuel
I agree, option B does sound like a bad idea. Overriding properties with inlined properties seems more flexible.
HY
Hyun 2 years ago
↳ replying to Lemuel
D) Inlined properties defined in @TestPropertySource can be used to override properties defined in property files.
RO
Roselle 2 years ago
↳ replying to Lemuel
A) Java system properties have higher precedence than the properties loaded from @TestPropertySource.
VI
Victor 2 years ago
Hold up, is this a trick question? I'm gonna go with D, just to be safe. Gotta love those inlined properties, am I right?
DE
Devora 2 years ago
Option A is the way to go. System properties should always take precedence, that's like Testing 101.
CH
Chanel 2 years ago
I'm not sure, but I think Java system properties have higher precedence than @TestPropertySource.
TR
Tresa 2 years ago
I'm going with C. The default behavior is to load a properties file relative to the project root, right? Seems like the most straightforward option.
WI
Willis 1 year ago
↳ replying to Tresa
User4: Let's go with C then, it seems to make the most sense.
MA
Markus 1 year ago
↳ replying to Tresa
User3: I'm not sure, but it does sound like the most straightforward option.
CH
Chantell 1 year ago
↳ replying to Tresa
User2: I agree, that's the default behavior of @TestPropertySource.
TA
Tamar 1 year ago
↳ replying to Tresa
User1: I think C is correct. It loads a properties file relative to the project root.
KA
Karon 1 year ago
↳ replying to Tresa
User4: User3, I think you're right. A seems like the most logical choice.
AN
Annelle 1 year ago
↳ replying to Tresa
User3: I'm not sure, but I think A is the correct answer. Java system properties have higher precedence, right?
LA
Lavelle 1 year ago
↳ replying to Tresa
User2: I agree with User1. D makes sense to me too.
EL
Eleni 1 year ago
↳ replying to Tresa
User1: I think D is the correct answer. Inlined properties can override properties from files.
TO
Tony 2 years ago
Option D sounds right to me. The docs say @TestPropertySource can be used to override properties from other sources. Seems like the best answer here.
GR
Gracia 2 years ago
I agree with Tequila, because inlined properties can override properties from files.
TE
Tequila 2 years ago
I think the correct answer is D.
0/2000 characters

Save Cancel