I have method:  public ReportBuilder addDiffs(List&lt;String&gt; diffs) {     if (this.diffs == null) {         this.diffs = new ArrayList&lt;&gt;();     }     this.diffs.addAll(diffs);     return this; }   And I want to make unit-test. As I khow it should be like:  @Test public void ReportBuilderTest() {     ReportBuilder builder = new ReportBuilder();     List&lt;String&gt; list = new ArrayList&lt;&gt;();     list.add("some string");      builder.addDiffs(list);      assertEquals(builder.getDiffs(), list)); }   It is example, but my class is inner service and i can't create getter for it. And diffs are private. How to make proper unit-test for this method? Maybe there is a problem with architecture?
How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having  (static in C/C++) or is in a private () namespace?  It seems bad to change the access modifier for a method or function just to be able to run a test.
UnboundLocalError: local variable 'url_request' referenced before assignment How to disable touchscreen permanently on ubuntu 18.04 Run a program X times Finding the perimeter of a right triangle with area given Pre-image of a measurable set A is always measurable? Suppose I have a dataframe consisting of six time series. In this dataframe, some observations are missing, meaning at some timepoints all time series contain a NA-value. In R, one possible imputation package that can be used to impute time series data is Amelia. However, this package does not work for observations that are completely missing. Are there other ways to impute my data? For what it's worth, the amount of missing observations is less than 20% of all observations. If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$.  I'm wondering if you can help me with this one? Is it possible to host a web server from behind a NAT My PC is behind a NAT router that has a public IP address. If I want to host a website then I believe I need a domain name which I can purchase from some site which would pledge to resolve all DNS requests for that domain name and send the IP address of my NAT router (assuming I do not want to host my domain name on their servers). Now I want to host a web server on my computer.   What changes should be done to the NAT router's configuration to forward all HTTP requests for example.com to my PC in the internal network. Is the above strategy correct? Is it commonly used? Can older cards that refer to a player/opponent ever be used on planeswalkers? Many older cards refer to players or opponents, e.g. "deal 3 damage to target player". Can any of these be used on planeswalkers, beyond the fact that you can simply attack them with creatures?  For example:   Would my opponent discard a card if  damaged a planeswalker they control? Would my opponent, the planeswalker, neither, or both amass poison counters from an unblocked ? Can  target a planeswalker? Does  affect planeswalkers? Can  prevent damage to a Planeswalker? Would  be obligated to take damage being dealt to a planeswalker? Can a planeswalker gain loyalty from ? Can  prevent damage to a planeswalker? Ambiguity of “not.... because” You are not hired because you are qualified.   I think this means you are hired but it is not because you are qualified. But I think this can  also means you are not hired, and the reason for it is that you are qualified.   Does this ambiguity really exist or do I mistake anything? Delete with Left Join in Oracle 10g Problems with \pgfplotstableread and relative paths Ubuntu kernel not upgrading with upgrade to 15.10 Can I travel to Paris for a day with a single entry visa for Schengen from Switzerland? I am visiting a friend in Switzerland for ten days. I have already got visitor's visa for the same on my Indian passport. Particulars mentioned on my visa are:  1. 'Etats Schengen' , 2. Single entry 3. Dates of visit. &amp; 4. Type of visa : C.  I understand that having already got ‘Etats Schengen' visa, I can travel to all Schengen countries.  I am also planning to visit Paris for a day during my stay in Switzerland. However, I never mentioned this in my visa application. I am planning to take a train from Geneva to Paris and book a hotel in Paris for one night. Can I possibly plan my Paris trip this way as I have Schengen visa, or I am not allowed to travel out of Switzerland as I never mentioned this in my visa application?   Also what does Single entry on my Schengen visa means: does it mean that I can enter and leave Switzerland only once or it means that I can enter and leave the Schengen region only once. Avoid trailing zeroes in printf() I keep stumbling on the format specifiers for the printf() family of functions.  What I want is to be able to print a double (or float) with a maximum given number of digits after the decimal point.  If I use:  printf("%1.3f", 359.01335); printf("%1.3f", 359.00999);   I get  359.013 359.010   Instead of the desired  359.013 359.01   Can anybody help me? Annuity notation in LaTeX I've been looking for some addon or something to render only the marked frames on timeline, i found this answer here on the stackexchange   The thing is this script only works with multiple cameras, i have only one camera that goes all aorund the scene but i only want to render the frames that i've marked on timeline.  Is there someone who can help me modify this script? Or find a better solution? Where can I download Windows 8 legally, from Microsoft? Is it possible to have multiple bevel objects along a curve? I'm wondering if it's possible to define multiple bevel objects along a curve and have Blender interpolate between the bevels like keyframes. Algorithm faster than Newton's for calculating $\sqrt{2}$