### Question:
Rectangle { public static double calculatePerimeter(double width, double height) { if (width <= 0) { throw new IllegalArgumentException("Širina mora biti veća od 0."); } if (height <= 0) { throw new IllegalArgumentException("Visina mora biti veća od 0."); } return 2 * (width + height); }  static void main(String[] args); static double promptArgument(String name, Scanner sc); static double calculateArea(double width, double height); static double calculatePerimeter(double width, double height); static String toString(double width, double height);  }### Answer:
@Test public void testPerimeterWithValidDimensions() { double width = 5; double height = 7; assertEquals(2 * (width + height), Rectangle.calculatePerimeter(width, height)); }
@Test public void testPerimeterWithNegativeWidth() { double width = -5; double height = 7; assertThrows(IllegalArgumentException.class, () -> Rectangle.calculatePerimeter(width, height)); }
@Test public void testPerimeterWithNegativeHeight() { double width = 5; double height = -7; assertThrows(IllegalArgumentException.class, () -> Rectangle.calculatePerimeter(width, height)); }